.net backend return json string , used by frontend

伪代码:

backend:

public string GetJson()

{

 

var lst = xxxLst;

var obj = Json(lst);
return new JavaScriptSerializer().Serialize(obj.Data);

}

 

frontend:

var jsonstr = ajax return GetJson();

$j("#SearchContent").autocomplete({
source: eval(jsonstr)})

 

你可能感兴趣的:(String)