还有在另一个页面如何请求到每个的值.特别郁闷的是格式不会写.
小弟就三十分了.一起来聊聊这个小东东吧!

解决方案 »

  1.   

    htpp://127.0.0.1/abc.aspx?param1=a&param2=b&param3=3
    用request.QueryString["param1"];
    request.QueryString["param2"]取值。
      

  2.   

    //传递参数
    Page.Response.Redirect("Index.aspx" + "?&SearchKey="+this.txtSearch.Text.Trim());//取得参数
    if(this.Request.Url.ToString().LastIndexOf("Search") > 0)
    {
    string strSearch = this.Request.QueryString["Search"].ToString();
    //將需要查詢的關鍵字放在ViewState中.
    this.ViewState["Search"] = strSearch;
    }
      

  3.   

    response.redirect("other.aspx?id="+strid+"name="+strname)接收时dim id , name as string
    id=request.querystring("id")
    name=request.querystring("name")
      

  4.   

    //传多个值代码为
    string strurl="";
    strurl="WebBrows.aspx?Code='dd'&Name="zxp'&Sex='Mrs'";//获取传过来的值
    string code=request["code"].tostring();
      

  5.   

    原页面button中;
    string s1,s2;
    s1 = Request.Form["layout"].ToString();
    s2 = Server.UrlEncode(Request.Form["pro_cheap_dis"].ToString());
    Response.Redirect("search_cheap.aspx?lay="+s1+"&dis="+s2);目标页面中获得的值
    LblLay.Text= Request.QueryString["lay"];
    LblDis.Text= Request.QueryString["dis"];