How can I retrieve element Id for Strolngly typed ASP.NET MVC HTML helper?

Posted by sh1ng on Stack Overflow See other posts from Stack Overflow or by sh1ng
Published on 2010-04-06T09:13:23Z Indexed on 2010/04/06 9:23 UTC
Read the original article Hit count: 225

Filed under:
|
|

Hi In my View I'm using jquery ui datapicker. So I need initiate it with code like this


$(function() {
        $('#elementID').datepicker({
        });
});
    

In my View


     <%= Html.TextBoxFor(m=>m.StartDate) %>
    

In old ASP.NET I may use


    tb_startDate.ClientID
    

What is about retrieving element Id of Strongly Typed ASP.NET MVC HTML Helper? Is is possible?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about jQuery