怎么把浏览器上面的链接 http://123.1.1.1/test.aspx 页面变成有参数地址的http://123.1.1.1/test.aspx?n=1  这种 谢谢

解决方案 »

  1.   

    源页面代码:     private void Button1_Click (object sender, System.EventArgs e)     {       string url;       url="http://123.1.1.1/test.aspx?n=1";       Response.Redirect(url);       }     目标页面代码:     private void Page_Load (object sender, System.EventArgs e)       {         string aa=Request.QueryString["n"];//获取传过来的参数值       }
      

  2.   

    web.config里边配置好httpmoduels节点,实现IHttpModuel..就可以实现伪URL了在映射里面 取消 aspx 映射
    ----------------
    IIS-属性-配置-映射具体你搜下吧。
      

  3.   

    1.超链接:<a href="http://123.1.1.1/test.aspx">http://123.1.1.1/test.aspx</a>
    2.后台:Response.Redirect("http://123.1.1.1/test.aspx");  
    3.1 JS:location.href="http://123.1.1.1/test.aspx";
    3.2 JS:location.replace("http://123.1.1.1/test.aspx");
    3.3 JS:window.open("http://123.1.1.1/test.aspx");
    ...
      

  4.   

              int num = 2;
            string Id = "2";
            string editURL = "FrmContractUpdate.aspx?stdId=" + Id + "&num=" + num;
            Response.Redirect(editURL);
      

  5.   

    参数无需定义~ test.aspx?hahaman=test.aspx?Id=参数是自己随便写的,只不过在接收的页面 接收的时候 要跟你传的参数写成一致的~
      

  6.   

    就是定义一个伪URL 该怎么设置??
      

  7.   

    url="http://123.1.1.1/test.aspx?n=1";是问“n”怎么来的吗?
    跟这个界面test.aspx里面的对应就行,随便你用啥