1.返回json,更新页面
json.vm:{"error":"$!error","message":"$!msg"}
js:
$(function(){
var data={id:$id,zhi:$zhi,ziduan:$ziduan};
${jq}post("/foodquickmod.aspx",data,function(dat){
var sss=dat.message;
$obj.parent("span").find("textarea").val(sss);
$obj.parents("td").eq(0).find(".backtext").html(sss);
},"json");
}
.cs
protected void Page_Load(object sender, EventArgs e)
{
string ziduan = Request.Params["ziduan"];
string zhi = Request.Params["zhi"];
string ids = Request.Params["id"];
string ssql = "update Food set " + ziduan + "='" + zhi + "' where systemid in (" + ids + ") ";
s.CreateSQLQuery(ssql).ExecuteUpdate();
s.Flush();
vh.Put("msg",zhi);
vh.Display("json");
}