Bài 10 – using tag helpers in forms in ASP.NET Core

The Form Tag Helper

10

The Input Tag Helper

<input asp-for=“<Expression Name>” />

12

Expression names

13

The Textarea Tag Helper

14

The Label Tag Helper

<label asp-for=“Email”></label>

The Validation Tag Helpers

<span asp-validation-for=“Email”></span>

The Validation Summary Tag Helper

<div asp-validation-summary=“ModelOnly”></div>

The Select Tag Helper

<select asp-for=“Country” asp-items=“Model.Countries”></select>

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s