Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6877645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:37:31+00:00 2026-05-27T04:37:31+00:00

I do a lot of coding in jQuery for my project, but I need

  • 0

I do a lot of coding in jQuery for my project, but I need help with obtaining parameter names genereated by Helper with For suffix.

When I do:

Html.TextBoxFor(model => model.SomeTextParameter)  

in pure html there’s generated id: “SomeTextParameter”. I’d like to get its id automagically generated in every place I use it in jQuery. How to do that?

Or, I can always manualy specify it’s name by using helper without “For”:

Html.TextBox("SomeTextParameter", this.Model.SomeTextParameter)

In this case I can control ids with easy but when I want to use Data Annotations for labels then I find another problem with connecting [Display(Name = "Really important text parameter")] with
Html.Label("SomeTextParameterLabel", <what to enter here?>).

When I use:

Html.LabelFor(model => model.SomeTextParameter)

it binds to display name so it’s displayed just as I want.

Any ideas how to solve 1st or 2nd problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:37:32+00:00Added an answer on May 27, 2026 at 4:37 am

    You can write your own helper to get generated ids. This should be useful https://stackoverflow.com/a/5419261/472126

    After that, you should be able to get generated Id by using this

    <%: Html.ClientIdFor(model => model.SomeTextParameter) %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Windows7 and I do lot of Java coding in Eclipse. But
I do a lot of coding in PHP and MySQL, but I'm looking at
I am coding a web portal which stores a lot user data and later
I have seen lot projects following this kind of coding style Any significant advantage
I need to store a lot of data coming in from a server into
i'm quite new here but this site helped me a lot already, so I
I have a table with one row in my HTML file. Now in jQuery
I am working on a Big Project and i have a lot of GWT
jQuery selectors are wonderful, but I sometimes I find myself typing them over and
1:sorry for this stupid question, but I am newbie in coding and this is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.