To work with HTML forms in MVC we use begin form () and end form () in HTML helper classes Go 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
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.