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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -