52,797
社区成员
发帖
与我相关
我的任务
分享
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["s"] == "1")
{
Response.Write("{success:true,wod:'hello world!'}");//向HttpResponse中输出hello world!
Response.End();//将页面缓冲发送向客户端浏览器 并中止该页输出 如果去掉这句 会得到多余的HTML代码
}
else
{
if (!IsPostBack)
{
if (Request.QueryString["class"] != null)
classname = Request.QueryString["class"];
db.InitDB("saploa");
databind();
}
else
{
// if (Request.Form["__EVENTTARGET"] == "UpdatePanel1") databind(); //接收前台触发事件id
//if (l != null)
//
}
}
}
s是我ajax回传的参数,我这个pageload总是要执行2遍,先执行完ajax那部分处理,然后又到pageload走一遍,刷新了整个页面。请问大概会是什么原因啊 前台ajax方法参数已经加了时间戳