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

📱Build WhatsApp Bot using .NET + OpenAI

   In this article, you will learn how to build a real-world WhatsApp chatbot using ASP.NET Core and OpenAI. This bot can automatically repl...