# form tag Helpers
1. We use the following common tag helpers to create a form in ASP.NET Core
Form Tag Helper
Label Tag Helper
Input Tag Helper
Select Tag Helper
Textarea Tag Helper
Validation tag helpers.
2. <form asp-controller="home" asp-action="create" method="post">
</form>
is equal to
<form method="post" action="/home/create"></form>
3. <input asp-for="Name"> is same as
<input type="text" id="Name" name="Name" value="">
4. Label Tag Helper
<label asp-for="Name"></label>
<input asp-for="Name">
generates
<label for="Name">Name</label>
<input type="text" id="Name" name="Name" value="">
5. Select Tag Helper
<select asp-for="Department"
asp-items="Html.GetEnumSelectList<Dept>()"></select>
same as
<select id="Department" name="Department">
<option value="0">None</option>
<option value="1">HR</option>
<option value="2">Payroll</option>
<option value="3">IT</option>
</select>
6.
Tuesday, 22 March 2022
Form Tag Helpers
Subscribe to:
Post Comments (Atom)
Search This Blog
Creating your first "Alexa" Skill
Index What is Alexa What is Alexa Skill? Why is it required when Alexa already equipped with voice assistant? Dev...
About Me
Menu
-
Index What is Alexa What is Alexa Skill? Why is it required when Alexa already equipped with voice assistant? Dev...
-
Adding Azure AD B2C to React Native App Register your app in Azure active directory 1. Go to azure ad b2c, app registratio...
-
# Project file 1. .net Core project file no longer contains file or folder reference - all files and folder present within the root fol...
No comments:
Post a Comment