2
I have the following error in C# 'The name 'Json' does not exist in the Current context' in my application. I followed all the recommended steps by various websites, such as adding such references and such, but the error continued.
using System;
using System.Web.Mvc;
using System.IO;
using DevExpress.XtraRichEdit;
namespace PCMSO
{
public partial class pcmso : System.Web.UI.Page
{
[HttpPost]
public JsonResult SalvaTexto(){
try
{
return Json(new { success = true, message = "Salvo!. "}, JsonRequestBehavior.AllowGet);
}
catch (Exception ex)
{
return Json(new { success = false, message = "Não foi possível salvar o documento. " + ex.Message }, JsonRequestBehavior.AllowGet);
}
}
}
}
what is the version of ASP.net / Framework?
– Leandro Angelo
has code inside the Try?
– novic