How to allow HTML to be inserted and updated in a SQL database in MVC

Home > Search > How-to

The following will need to be added to the top of the Controller.

using System.Web.Mvc;


Then add [AllowHtml] before the public string.

public string column_name { get; set; }


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter in the box below so that we can be sure you are a human.