Single to handle multiple "Submit" button Clicks in MVC3 Razor View
Last week, I have faced a problem on handling the multiple "Submit" buttons clicks in a View.I am not very good at MVC3 but I want to share my experience so that others can find some solution regarding this problem. Suppose we have many Submit buttons in a View where we want to handle the different functions. In the Controller of the We need to write the Code for different submit buttons as given below [ AcceptVerbs ( HttpVerbs . Post ) ] public ActionResult FormActions ( string submitButton ) { switch ( submitButton . ToLower ( ) ) { case " click to know date " : this . SetNotification ( DateTime . Now . Date . ToString ( " dd-MMM-yyyy " ) , NotificationEnumeration . Success , true ) ; return View ( " index " ) ; break ; case " click to know time " : ...