Return Json from Controller in ASP.Net MVC

KatieNgoc
 
on May 24, 2022 10:46 PM
754 Views

Hello,

Where is Json() going to after return its values in empty view().

Please see the codes

ASP.Net MVC VOID ActionResult: Controller Action method without return View

I don't know where is json() going to.  Please explain your referred article.

Thank you so much

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on May 25, 2022 12:46 AM
on Jun 09, 2022 06:52 AM

When firstName and lastName is empty, the EmptyResult i.e. NULL object is returned to the Ajax Success function, else Json is returned with true value to the Ajax success function.

dharmendr
 
on May 25, 2022 10:45 PM

Json (JavaScript Object Notation) is returning to the ajax success function in text format.