在protected void Timer1_Tick(object sender, EventArgs e)
    {
      if (dtnow > dtTimeout)
        {
            Response.Write("<script>");
            Response.Write("alert(' 您的答题时间已到,感谢您参加江西联通客户代表招聘工作互联网测试问卷,祝您愉快!');");
            Response.Write("</script>");            selfover(0);
            this.Timer1.Enabled = false;
        }
}
就跳出Sys.WebForms.PageRequestManagerParserErrorException:The message received from the server could not be parsed.Common causes for this error are when the response is modified by calls to response.Write(),response filters,httpModules,or Details:Error parsing near'<script>alert('您的答题'
这样的错误,希望大家帮我看下,谢谢。。

解决方案 »

  1.   

    //改成这样试试
    if (dtnow > dtTimeout)
            {
               this.RegisterStartupScript("s1", "<script language='javascript'>alert('您的答题时间已到,感谢您参加江西联通客户代表招聘工作互联网测试问卷,祝您愉快!')</script>");            selfover(0);
                this.Timer1.Enabled = false;
            }

      

  2.   

    ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "click", "alert('提示信息')", true); 
      

  3.   

    ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('您的答题时间已到,感谢您参加江西联通客户代表招聘工作互联网测试问卷,祝您愉快!')", true);
      

  4.   

    现在那个问题是解决了,但是selfover(0)方法里面也有一个,
     Response.Write("<script>");
                    Response.Write("alert('您的试卷已提交成功!');");
                    Response.Write("</script>");
                    Response.Write("<script>window.close();</script>");
    代码,就是不会跳出来,还有其他方法吗??