I'd like to implement view.cshtml file within action and then get its result as string, but not returning as ActionResult from action method.
To explain with code, instead of:
public ActionResult Tesst()
{
// return ViewResult
return View();
}
İt must be so:
public string Test()
{
string viewResult = string.Empty;
// implement "test.cshtml" and get its result as string
// assign result to viewResult variable
return viewResult;
}
Any helps would be appreciated.