I am trying to create a the following tag using Razor but am having problems with html escaping.
<input type="button" value="Edit" onclick="EditOnClick('Name','Description')"/>
I have tried the following solutions
string onClick = string.Format("OnEdit(\'{0}\',\'{1}\')", item.Name, item.Description);
<input type="button" value="Edit" onclick="@Html.Raw(onClick)"/>
<input type="button" value="Edit" onclick="@(HttpUtility.HtmlDecode(onClick))"/>
<input type="button" value="Edit" onclick="@(new HtmlString(Model.Content))"/>
onclick="@Html.Raw(onClick)"actually generate on the client side? You mentionedonclick="EditOnClick('Name','Description')"but I can't seeEditOnClickinsidestring.Formattext.