目前,我已经编写了以下 json 搜索方法。
[HttpPost]
public JsonResult Search(string videoTitle)
{
var auth = new Authentication() { Email = "abc@smu.abc", Password = "abc" };
var videoList = server.Search(auth, videoTitle);
String html = "";
foreach(var item in videoList){
var video = (Video)item;
html += "<b>"+video.Title+"</b>";
}
return Json(html, JsonRequestBehavior.AllowGet);
}
在屏幕上,它返回这个。
"\u003cb\u003eAge of Conan\u003c/b\u003e"
我应该怎么办?我想这样做的原因是,我可以利用 CSS 来设置标签样式,以便在项目从搜索输入中下拉时看起来更美观。
谢谢