HTML and CSS Reference
In-Depth Information
Figure 3-5. Adding the EmailAddress template
6.
This will generate a view page named EmailAddress.cshtml . Delete the entire
content and replace it with the following code. This uses the Textbox() method but
specifies some additional attribute including type and placeholder .
@Html.TextBox("", null, new { @class = "text-box single-line", type = "email",
placeholder = "Enter an e-mail address" })
7.
save your changes and debug the application. Go to the Registration page and you
should see the placeholder text displayed in the empty Email address field as shown in
Figure 3-6 .
Search WWH ::




Custom Search