I am using Jquery for displaying multiple tabs in MVC 3, based on the tutorial.Tutorial
I am loading the data for various tabs based on the partial views using the Jquery.
All the partial views are with the attribute [HttpGet]. I want to place a button in the partial view and when I click on that button it should call service and submit the data to server.
Could I do that using a partial view with attribute [HttpPost]? I tried that but it complains saying that there cannot be two methods with same Name.
are partial views does not support [HttpPost]? Am I doing something wrong?
If you have done in other way to complete these kind of task please let me know.
Thank you
Even though you may have attributed your Action methods with
[HttpGet]and[HttpPost], they need different parameter lists. In my example below, you will need to post astringnamedsomeDatain order to receive a response.So, this is valid:
And, this is not valid: