Problem Creating dynamic Id for textbox in asp.net mvc
        Posted  
        
            by Fraz Sundal
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Fraz Sundal
        
        
        
        Published on 2010-06-08T08:56:28Z
        Indexed on 
            2010/06/08
            9:02 UTC
        
        
        Read the original article
        Hit count: 361
        
asp.net-mvc
I have 3 textboxes in three different tab control and i want to generate textbox id like textbox plus concatenate the tab number
for(int i=0;i<3;i++)
{
    <%: Html.TextBoxFor(e=>e.vcr_LinkName + i)%>
}
its not working but when i change it to
 for(int i=0;i<3;i++)
    {
        <%: Html.TextBox("vcr_LinkName" + i)%>
    }
it works fine. but i want to use textboxfor instead of textbox
© Stack Overflow or respective owner