TextBoxFor rendering to HTML with prefix on the ID attribute
Posted
by msi
on Stack Overflow
See other posts from Stack Overflow
or by msi
Published on 2010-01-12T20:08:48Z
Indexed on
2010/03/18
12:11 UTC
Read the original article
Hit count: 1038
asp.net-mvc-2
|c#
I have an ASPNET MVC 2 project. When I use
<%= Html.TextBoxFor(model => model.Login) %>
the TexBoxFor will render as
<input id="Login" name="Login" type="text" value="" />
Field in the model is
[Required(ErrorMessage = "")]
[DisplayName("Login")]
public string Login { get; set; }
Can I made id and name attribute with some prefix? Like
<input id="prefixLogin" name="prefixLogin" type="text" value="" />
Thanks to all.
© Stack Overflow or respective owner