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

Complete Authentication System in ASP.NET Core using JWT

JWT (JSON Web Token) authentication is widely used for securing APIs in modern applications. In this article, we will build a complete authe...