asp.net mvc 4 - HTML Helper in MVC -
how use overload of html.textbox in mvc.
@html.textbox(string name, object value, string format, object htmlattributes)
the name represents name of texbox
the value represents value of textbox i.e text inside textbox
the htmlattributes represents html attributes
what format (the third parameter) represents? how use it? please provide example.
thanking you. simple basic question. have searched google , did not answer.
the name
represents name of texbox
the value
represents value of textbox i.e text inside textbox
the htmlattributes can specify your
id control , css classes
string format can specify formats "{0:d mmm yyyy}"
for example:
@html.textboxfor("txtdate","somedate","{0:d mmm yyyy}", new { @class="input-large" })
Comments
Post a Comment