Reputation: 1
UrlDecode is not decoding strings in a razor drop down list. Here is what I have tried:
I have tried using WebUtility.UrlDecode and HttpUtility.UrlDecode
@Html.DropDownListFor(m => m.questions, new SelectList(Model.questions,
"id", WebUtility.UrlDecode("Answer")), null, new { @class = "data"})
String in drop down list such as "My%20House" not decoding to "My House"
Upvotes: 0
Views: 56
Reputation: 100
You can use something like :
@Html.Raw(YourValue)
or
@Html.Raw(HttpUtility.HtmlDecode(YourValue));
Upvotes: 2