在用Response.Redirect()或Response.Write()进行URL带参数的页面重定向时出现如题所示的错误。
1:Ajax是无刷新的,而使用Response进行带参重定向时需要刷新页面。所以只须在UpdatePanel下设置“asp:PostBackTrigger”的“ControlID”为指定的控件名称即可,如:
<Triggers>
<asp:PostBackTrigger ControlID="btnSave" />
</Triggers>

2:如果你用的是微软的ajax框架,弹出提示框应该用:
ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "updateScript", "alert('对不起,账号和密码错误');", true);

3:EnableEventValidation="false"

 

相关文章:

  • 2021-06-24
  • 2022-02-21
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
  • 2021-10-11
猜你喜欢
  • 2021-10-05
  • 2021-04-18
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2021-04-30
相关资源
相似解决方案