#1: Add AllowHtml Attribute into property in the model
#2: Turn off validation on the Action:
[HttpPost]
[ValidateInput(false)]
public ActionResult Index(string htmlsource)
{
var x = htmlsource;
return View();
}
http://msdn.microsoft.com/en-us/library/system.web.mvc.allowhtmlattribute(v=vs.98).aspx
Following link is about to solve same problem in ASP.NET webform
http://rayaspnet.blogspot.ca/2011/02/how-to-properly-deal-with-exception.html
No comments:
Post a Comment