HOW DO RETURN STRING STRING RESULT IN ASP.NET MVC ?

Total Post:70

Points:494
 1290  View(s)
Ratings:
Rate this:

In my ajax call, I want to return a string value back to the calling page.

Should I use ActionResult or just return a string?

  1. Post:194

    Points:1396
    Re: How do return string string result in Asp.Net MVC ?

    You can just use the ContentResult to return a plain string.

    public ActionResult Temp()
            {
                return Content("Hi there!");
            }

      Modified On Apr-05-2018 06:57:20 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!