【发布时间】:2012-03-20 12:07:37
【问题描述】:
目前,我已经编写了以下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 来设置标签样式,这样当项目从搜索输入中下拉时,它看起来更美观。
谢谢
【问题讨论】:
标签: html json asp.net-mvc-3 jsonresult