前端JS:
function GetData(id) { var url = "ajax/Handler.ashx"; $.ajax({ type: "POST", url: url, dataType: "html", async: true, data: { "id": id }, success: function (data) { $("#video_P").html(data); } }); }
后端:
public void Get() { int id = Convert.ToInt32(HttpContext.Current.Request.Form["id"]); Video = BllFriendLink.GetModel(id); string html = Video.Url; HttpContext.Current.Response.Write(html.ToString()); }