Reputation: 426
In my project login Form i have to implement Default Display and when we click on the textbox ,textbox has to be in blank and vice - versa.This is my code
<li><i class="icon-user"></i>@Html.TextBoxFor(Model => Model.UserName, new { @class = "login-user-input", autocomplete = "off", @value="UserName"})</li>
<li><i class="icon-key"></i> @Html.TextBoxFor(Model => Model.Password, new { @class = "login-user-input", autocomplete = "off" })</li>
Upvotes: 1
Views: 293
Reputation: 133453
You can use placeholder
attribute
@Html.TextBoxFor(Model => Model.UserName,
new {
@class = "login-user-input",
autocomplete = "off",
placeholder="UserName"
})
Upvotes: 4