string ip = lb1.Text;
            string name = Username.Text;
            Response.Redirect("http://localhost:3299/Message.aspx?name="+Server.UrlEncode(name));这是单个参数的,我现在想再加上传送ip这个变量  该怎么做

解决方案 »

  1.   

    http://localhost:3299/Message.aspx?name="+ip);
      

  2.   


    string ip = lb1.Text;
                string name = Username.Text;
                Response.Redirect("http://localhost:3299/Message.aspx?name="+Server.UrlEncode(name)+"&ip="+ip);
      

  3.   

    string url="http://localhost:3299/Message.aspx?name={0}&ip={1}"
    Response.Redirect(string.Format(url,Server.UrlEncode(name),Server.UrlEncode(ip)));
      

  4.   

    http://localhost:3299/Message.aspx?name=张三&&ip=192.168.0.1&&参数名=参数
      

  5.   

    这也只是传递了ip这一个参数啊   我想传递的是name和ip两个参数
      

  6.   

    多参数 用 &分隔就可以了