Category - ASP.Net
Results 21 - 25 of 2130
16 Dec 2019 16 Dec 2019 0 Comments  960 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  817 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  1145 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  953 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.
16 Dec 2019 16 Dec 2019 0 Comments  702 Views
ASP.Net  MVC  Button  Form
Here Mudassar Ahmed Khan has explained with an example, how to use multiple Submit buttons in one Single View 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 use multiple Submit buttons inside 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 is performed in ASP.Net MVC Razor.
Results 21 - 25 of 2130