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.
↧