1.
将参数保存在Session状态中:
Session["para"] = 参数值;
2.
给按钮添加onclick属性,以打开新的页面:
this.btn.Attributes.Add("onclick","window.open('新页面.aspx','newwin','toolbar=no,menubar=no,status=no,location=no,resizable=no,scrollbars=no,width=380,height=400,top=100,left=200');return false;");
3.
在新页面中将参数值读出:
string str_para = Session["para"].ToString();

解决方案 »

  1.   

    Server.Transfer("xxx.aspx?参数名=值");
      

  2.   

    在按钮的onclick事件中添加
    Response.Write("<script language=javascript>window.open('new.aspx?id='"+id+")</script>")
    在new.aspx页面上Request["id"].Tostring()即可
      

  3.   

    1.在父页面中btn.Attributes.Add("onclick","window.open('newpage.aspx?val=xxx')")
    2.在子页面中string str=Request["val"];
      

  4.   

    然后在新页面中接收
    string str;
    str=Request.QueryString["参数名"].ToString();
      

  5.   

    方法一:
    <input onclick="OpenWindow()" type="button" value="OpenWindow" name="button2">
    <script language="javascript">
             function OpenWindow()
             {
             window.open("WebForm1.aspx?[你的参数名]=[你的参数值]","face","width=400,height=300,resizable=0,scrollbars=0,status=0,menubar=0");
             }
    </script>
    方法二:
      <a target='_blank' href='WebForm1.aspx?[你的参数名]=[你的参数值]'>查看</a>
      

  6.   

    1.htm:
    <HTML> 
    <HEAD> 
    <TITLE>无标题文档</TITLE> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> 
    <form name="form1" method="post" action="" ID="Form1"> 
    <table><tr><td><input type="text" id=mytext name="textfield"> </td><td><a href="#" onclick="document.form1.mytext.value=window.showModalDialog('2.htm','width=20px;height=30px'); ">单击选择客户</a></td></tr></table>
      
    </form> 
    </BODY> 
    </HTML> <HTML> 
    <HEAD> 
    <TITLE>无标题文档</TITLE> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> 
    <form name="form1" method="post" action="" ID="Form1"> 
    <table><tr><td><input type="text" id=mytext name="textfield"> </td><td><a href="#" onclick="document.form1.mytext.value=window.showModalDialog('2.htm','width=20px;height=30px'); ">单击选择客户</a></td></tr></table>
      
    </form> 
    </BODY> 
    </HTML> 
    2.htm:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script> 
    function wu(w) 

    window.returnValue = w; 
      window.close(); 

    </script> 
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <a href="#" onclick="wu('名字')">名字</a>
    </body>
    </html>
      

  7.   

    上面的帖子大多将精力集中于js方法。我想你可以用web控件来实现这个按纽啊! 就是asp:button。
    只要在这个按纽的click事件中加入相应代码即可,假设控件ID为Btn_Popup_Page,需要弹出的页面为newpage.aspx
    private void Btn_Popup_Page()
    {
        string sValue=[***你想传递的值***];
        Server.transfer("newpage.aspx?sValue="+sValue.trim());
    }谢谢!希望对你有用!
      

  8.   

    e:\inetpub\wwwroot\Webdatagrid\da.aspx.cs(51): “System.Web.HttpServerUtility”并不包含对“transfer”的定义
    private void btn_Click(object sender, System.EventArgs e)
    {

                   Server.transfer("new.aspx");
    }
    是怎么回事?
      

  9.   

    啊!?
    你是不是把t小写了,你写完Server输入.后系统会有提示的啊!
      

  10.   

    you try:1)在模板列中传递参数:
    <Columns>
       <asp:TemplateColumn>
         <ItemTemplate>
    <asp:HyperLink  id="Hyperlink1" NavigateUrl='<%# "Links.aspx?ItemID=" + DataBinder.Eva(Container.DataItem,"id") ' runat="server" ></asp:HyperLink>
         </ItemTemplate>
       </asp:TemplateColumn>
    </Columns>
    2)新页面得到该参数:
    string idString = "";
    if (Request.Params["ItemID"] != null)
    idString = Request.Params["ItemID"];
             if (idString != "")
    {
    int id = Int32.Parse(idString);
    }