• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

HTML forms in MVC

Working with HTML forms in MVC

2To work with HTML forms in MVC we use begin form () and end form () in HTML helper classes

 5

 

 2Go to home folder in view

       ↓

Create a new page with the name sample2

       ↓

Learn ASP.Net by Tekslate - Fastest growing sector in the industry.
Explore Online ASP.Net Training and course is aligned with industry needs & developed by industry veterans.
Tekslate will turn you into ASP.Net Expert.

Go to source part

Write the following code to create the design of the form

<body>

<div>

<h1>welcome to satya technologies</h1>

<%HTML.begin form();%>

<%=HTML.label(“enter user name”)%>

<%=HTML.text box(“T1”)%></br>

<button id=”B1” type =”submit”>submit</button>

<%HTML.end form();%>

Go to home control.cs write the following code for create an action method for sample2

Public action result sample2()

{

Return view ();

}

Go to global.asax change action name to sample2 and sum the application and check

For indepth understanding click on

 

Summary
Review Date
Reviewed Item
HTML forms in MVC
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on HTML forms in MVC"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.