I love ASP.NET MVC, keeping up with releases / documents is sometimes difficult, so maybe I just don’t get something ... I want to use TextBoxFor () and work with LabelFor (), etc., that's all magic happens to me.
But if I create ...
<%=Html.TextBoxFor(x => x.LastName) %>
And I wanted to do something nice with jQuery, how would I get the identifier of the created control? I could add a CSS class and use it to attach jQuery, but for something I do, I need an identifier ... so I could do something like:
$('#LastName').(...)
I know that in this case I can figure it out and crack it manually, but is there a more accurate way?
asp.net-mvc-2
Colin asquith
source share