首先 确定你的 this.TextBox1.Text 这个值是被取到了的

解决方案 »

  1.   

    去掉控件的AutoPostBack!
    否则 先执行load方法,这时this.TextBox1.Text=“”了。
    所以你提交后是“”。
      

  2.   

    这样写肯定无错 跟踪一下 this.TextBox1.Text 的值看看。
      

  3.   

    或许 this.TextBox1.Text 本身就是"空"
    你是不是在 void Page_Load() 里在没有 if (!IsPostBack) 限制的情况下
     对 this.TextBox1 做了"手脚"
      

  4.   

    取textbox1.text的时候先alert一下 它到底有没有值
    response.Write("<script>alert('"+ this.Textbox1.text +"')</script>")
    或者断点调试一下,
    然后在Response.Redirect("seachBan.aspx?id=3&seach="+ server.UrlEndcode(this.TextBox1.Text));试试
      

  5.   

    我试过了,用
    Response.Redirect("seachBan.aspx?id=3&seach="+this.TextBox1.Text);
    后可以取得到值,我是如下取的:Response.Redirect("seachBan.aspx?id=3&seach="+this.TextBox1.Text);
    protected void Page_Load(object sender, EventArgs e)
    {
    for (int i = 0; i < this.Request.QueryString.Count; i++)
    {
    string s = this.Request.QueryString[i];
    }
    }
    s的值以次是
    3
    abcd    //我文本框里输入的字符串就是abcd
      

  6.   

    如果加上对this.IsPostBack的判断则是如下的样式:protected void Page_Load(object sender, EventArgs e)
    {
    if (!this.IsPostBack)
    {
    for (int i = 0; i < this.Request.QueryString.Count; i++)
    {
    string s = this.Request.QueryString[i];
    }
    string seach = this.Request.QueryString["seach"];
    }
    }
      

  7.   

    是不是因为有特殊的字符在文本框里呢?
    那就加上Server.HtmlEncode编码及Server.HtmlDecode解码:protected void Page_Load(object sender, EventArgs e)
    {
    if (!this.IsPostBack)
    {
    string seach = Server.HtmlDecode(this.Request.QueryString["seach"]);
    }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
    Response.Redirect("login.aspx?id=3&seach=" + Server.HtmlEncode(this.TextBox1.Text));
    }
      

  8.   

    this.TextBox1.Text 是否为只读?
    偶以前也遇到过。
      

  9.   

    试试这个Response.Redirect("seachBan.aspx?id=3&seach='"+this.TextBox1.Text.ToString()+"'");
      

  10.   

    把 Web.config 里面的编码设置为gb2312
      

  11.   

    会不会是 Form 的 method=post
      

  12.   

    写法没错,
    1.调试看一下是不是TextBox1本来就是空的
    2.如果TextBox1不是空的就看看if (!this.IsPostBack)有没加