Category - MVC
Results 6 - 10 of 506
16 Dec 2019 16 Dec 2019 0 Comments  1250 Views
ASP.Net  MVC  Button  Form
Here Mudassar Ahmed Khan has explained with an example, how to call Controller's Action method with Parameter on Button Click in ASP.Net MVC Razor.

When the Submit Button is clicked, the Form will be submitted and the data inside the Form will be sent to the Controller's Action method as parameter using Model class object in ASP.Net MVC Razor.
16 Dec 2019 16 Dec 2019 0 Comments  739 Views
ASP.Net  MVC  Button  Form
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) data from View to Controller on Button Click in ASP.Net MVC Razor.

When the Submit Button is clicked, the Form will be submitted and the data inside the Form will be passed (sent) to the Controller’s Action method using Model class object in ASP.Net MVC Razor.
16 Dec 2019 16 Dec 2019 0 Comments  536 Views
ASP.Net  MVC  Button  Form
Here Mudassar Ahmed Khan has explained with an example, how to call HTTP POST Action method on Button Click in ASP.Net MVC Razor.

When the Submit Button is clicked, the Form will be submitted and the HTTP POST Action method of Controller will be called in ASP.Net MVC Razor.
16 Dec 2019 16 Dec 2019 0 Comments  759 Views
Here Mudassar Ahmed Khan has explained with an example, how to call (consume) Web API inside HTTP POST Action method of Controller in ASP.Net MVC Razor.

When the Submit Button is clicked, the HTTP POST Action method of Controller will be called which in turn will call the Controller method of Web API 2.

The Web API 2 Controller method will fetch records from database using Entity Framework in ASP.Net MVC Razor.

The Web API 2 Controller method will be called using WebClient class inside MVC Controller.
16 Dec 2019 16 Dec 2019 0 Comments  701 Views
ASP.Net  MVC  Button  Form
Here Mudassar Ahmed Khan has explained with an example, how to call multiple Action methods using one Single Form in ASP.Net MVC Razor.

One Form in a View can do a POST submission to one Action method in Controller and hence in order to call multiple Action methods using one single Form in a View, a Switch case has to be implemented inside the Action method.

The Switch case detects the clicked Submit button by fetching its Value from the Request.Form collection and the appropriate Action method will be called in ASP.Net MVC Razor.
Results 6 - 10 of 506