Click here to Skip to main content
15,879,068 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
mvc model returning
Subject Test- (' 1)
for input textbox- Subject Test- ('1) when im attaching model field to textbox in one of the function.

any idea to fix it.

What I have tried:

HTML
@Html.Raw(HttpUtility.HtmlDecode(@Model.property));

and
HTML
System.Web.HttpUtility.HtmlDecode(Model.Property);
Posted
Updated 13-Apr-20 23:56pm
v2

1 solution

You've confused it with System.Web.HttpUtility.HtmlEncode which will escape single quote.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900