Programming, Web News, Web Hostings, Technology
ASP.NET MVC – How to have multiple submit button in form
In this tutorial, I would like to share simple form POST submit in ASP.NET MVC. The scenario is whenever your have have multiple submit button, you have to set each of the submit button value to be different.
End result page in your home page will containing two button (Search and Save button) in the same form.
Form above is rendered from HTML code behind as shown below
Create a new controller named “ProductController” in controller folder; Create a new folder named “Product” in “Views” folder, following by adding two new views (Save.aspx and Search.aspx)
Open up your “ProductController”, create three method as following (Edit, Search and Save)
You can download the sample code from here
Related posts:
- ASP.NET MVC – How to implement querystring In this tutorial, I would like to share with you...
- Windows 7 GodMode There is a trick in Windows7 that enable you to...
| Print article | This entry was posted by ervinter on September 25, 2009 at 10:00 am, and is filed under Programming. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |



