代码如:
document.location.href = url +  '?CurrentPage=' + txtPage.value ;实现文本框输入数字以后,跳动DataGrid制定的分页上去。确保地址正确,因为在“改变其URL的时候会打开一个新的普通页面“,这个页面正是分页后的正确页面。在模态窗口的头里面已经放有:
<base target='_self'>
在模态窗口里面点击按钮提交不会弹出新页面。

解决方案 »

  1.   

    你可以把模态窗口弹出的页面包含在框架页中,请看我这个问题中的示例:http://community.csdn.net/Expert/topic/2637/2637793.xml?temp=.3023493
      

  2.   

    感谢: webdiyer(陕北吴旗娃)
    试试先!
      

  3.   

    比如
    WebForm1.aspx
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '在此处放置初始化页的用户代码
        If (Not IsClientScriptBlockRegistered("clientScript")) Then
          Dim strScript As String = "<script>" + vbCrLf
          strScript += "function OpenWin(){" + vbCrLf
          strScript += "var str=window.showModalDialog('WebForm2.aspx',document.Form1.TextBox1.value)" + vbCrLf
          strScript += "if(str!=null)  document.Form1.TextBox1.value=str" + vbCrLf
          strScript += "}" + vbCrLf
          strScript += "</script>" + vbCrLf
          RegisterClientScriptBlock("clientScript", strScript)
        End If
        Button1.Attributes.Add("onclick", "OpenWin()")
      End Sub
    WebForm2.aspx
      <frameset rows="0,*">
        <frame src="about:blank">
        <frame src="WebForm3.aspx">
    </frameset>
    WebForm3.aspx关键是webform2.aspx用框架页
    是为了防止提交时打开新页面。
      

  4.   

    这样肯定能解决.参考示例:
    http://dotnet.aspx.cc/ShowDetail.aspx?id=49ML4AO8-5PB3-4KNY-NJZD-LJOIOXV4M1X4
      

  5.   

    window.showModalDialog("xxx.htm")  
     
    xx.htm  
    ====================  
     
     
    <frameset  rows="0,*">  
    <frame  src="about:blank">  
    <frame  src="xxx.asp">  
    </frameset>  
     
    xxx.asp  
    =========  
    <form  target="_self"  method=post>