Category - AJAX
Results 1 - 5 of 337
06 May 2021 06 May 2021 0 Comments  218 Views
Here Mudassar Ahmed Khan has explained with an example, how to return Exception Error Message when using JSON and AJAX in ASP.Net MVC Razor.

This article will illustrate how to return the Exception Error Message using JSON from the Controller when calling the Controller using jQuery AJAX in ASP.Net MVC Razor.
30 Apr 2021 30 Apr 2021 0 Comments  328 Views
ASP.Net  AJAX  jQuery  MVC
Here Mudassar Ahmed Khan has explained with an example, how to create a VOID ActionResult (Action Method) i.e. an ActionResult (Action Method) inside Controller that does not return View in ASP.Net MVC Razor.

There is nothing like a VOID ActionResult (Action Method), hence ASP.Net MVC has created a class EmptyResult whose object is returned in case when NULL value or Nothing needs to be returned from Controller to View in ASP.Net MVC Razor.
30 Apr 2021 30 Apr 2021 0 Comments  272 Views
ASP.Net  AJAX  jQuery  MVC
Here Mudassar Ahmed Khan has explained with an example, how to return NULL (Nothing) from ActionResult (Action Method) in ASP.Net MVC Razor.

There are two ways to return NULL from an ActionResult (Action Method):
1. Using EmptyResult class. In order to learn more about EmptyResult class, please refer my article ASP.Net MVC EmptyResult Example: Return NULL (Nothing) from Controller to View.
2. Simply return NULL value. In such case, ASP.Net automatically returns EmptyResult class object internally.
30 Apr 2021 30 Apr 2021 0 Comments  302 Views
Here Mudassar Ahmed Khan has explained with an example, how to delete data from Database using jQuery AJAX and Entity Framework in ASP.Net MVC Razor.

When the Delete Button is clicked, the DeleteCustomer Action method of the Controller is called using jQuery AJAX and the details of Customer are sent as JSON object.

Finally, a Customer object is sent to the View which indicates that the record was successfully deleted or not.
30 Apr 2021 30 Apr 2021 0 Comments  250 Views
ASP.Net  AJAX  jQuery  MVC
Here Mudassar Ahmed Khan has explained with an example, how to use EmptyResult in ASP.Net MVC Razor.

EmptyResult is a class in ASP.Net MVC whose object is returned in case when NULL value or Nothing needs to be returned from Controller to View in ASP.Net MVC Razor.
Results 1 - 5 of 337