updatepanel中好像不能用response.redirect,那该怎么使网页转页呢

解决方案 »

  1.   

    在web.config的<httpModules>节点中加入中加入以下内容即可实现Updatepanel下使用Response.Redirect
        <httpModules>
          <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </httpModules>
      

  2.   

    使用js:ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "MessageShow", "window.location='a.htm'", true);
      

  3.   

    ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "MessageShow", "window.location='a.htm'", true);