public JsonResult DeleteTemplate(string path, string controlType)
{
if (System.IO.File.Exists(Server.MapPath(path)))
{
System.IO.File.Delete(Server.MapPath(path));
var templates = CanvasHelper.GetTemplates(controlType);
return Json(new { success = true, templates = templates });
}
else
{
return Json(new { success = false, message = "Template file not found" });
}
}