Saturday, June 22, 2013

Textbox in MVC3

Readonly
@Html.TextAreaFor(m => m.Password, new { @readonly = "readonly" })


Adding Css
 @Html.TextAreaFor(m => m.Password, new { style = "width:100px;height:25px;background-color:#000" })

Enable-disabled
@Html.TextBoxFor(m => m.Password, new { disabled="disabled" })
Password
@Html.PasswordFor(m => m.Password, new { id = "txtPassWord"})

Default Value
@Html.TextBoxFor(m => m.UserName, new { @name="Name",  @Value = "test" })

No comments:

Post a Comment

Opps Part 1 : Abstraction

  Abstraction in C# is a fundamental concept of object-oriented programming (OOP) that allows developers t...