ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Options for Autocomplete displaying as HTML encoded
Title:
B
I
{code}
?
I'm pulling a list from a database and one of the items is "B&M". When the autocomplete pulls it back and displays it as an option it shows "B&M". Any clue how I can get it to NOT encode the options? The code in the HTML is: @Html.Awe().Autocomplete("Category_Notes").Controller("Coding").Action("GetCatNotesAC") And the code in the controller is: public ActionResult GetCatNotesAC(string v)// v is the entered text { v = (v ?? "").ToLower().Trim(); Websites db = new Websites(); var items = db.dsWebsites.Where(o => o.Category_Notes.ToLower().Contains(v)).Distinct().ToList(); return Json(items.Take(10).Select(o => new KeyContent(o.Category_Notes, o.Category_Notes))); }
Save Changes
Cancel
Eric Peele
asked at 30 May 2017
try `new KeyContent(o.Category_Notes, o.Category_Notes, false)` or use the odropdown instead as shown here: http://demo.aspnetawesome.com/AjaxRadioListDemo#Odropdown-with-remote-search (select git repo dropdown)
at 31 May 2017
Omu
Wow...feel like an idiot. Thanks for such a simple solution. BTW, love the product.
at 31 May 2017
Eric Peele
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK