protected void Page_Load(object sender, EventArgs e)
    {
        
          if (!IsPostBack)
     {
         string idValue = Request.QueryString["Googid"];
         TextBox10.Text = idValue;        /////以上为第一个网页传过来的值,给了TextBox10
                 string idValue1 = Request.QueryString["Goodid"];
         TextBox24.Text = idValue1;
        /////以上为第一个网页传过来的值,给了TextBox24
              }
    }当从第一个页面传递一个值给 TextBox10时, TextBox24的值被自动清空了,当从第二个页面传递一个值给 TextBox24时, TextBox10的值被自动清空了,怎样改成让他们之间不相互影响。给TextBox10传值时, TextBox24的值不要清空。

解决方案 »

  1.   

    楼主需要先去了解一下ASP.NET的页面生命周期。
      

  2.   

     if (!IsPostBack)
      {
      string idValue = Request.QueryString["Googid"];
      TextBox10.Text = idValue;    TextBox24.Text = idValue1;
      }
    不明白是什么意思。。
      

  3.   

    看你需要好好理一下思路,然后再把问题说清楚。就你现在的代码,两个textbox的值肯定是一样的
      

  4.   

    没明白。你现在的两个textbox的值肯定是一样,都是来自Request.QueryString["Googid"];
      

  5.   

    设计的似乎有问题一个治标的办法是用Request.UrlReferrer值区别一下,可以解决你目前的问题。但是感觉不太舒服,挺别扭的
      

  6.   

    您了解一下ASP.NET的生命周期吧!!!
      

  7.   

    protected void Page_Load(object sender, EventArgs e)
      {
        
      if (!IsPostBack)
      {
      string idValue = Request.QueryString["Googid"];
      TextBox10.Text = idValue;  /////以上为第一个网页传过来的值,给了TextBox10
      string idValue1 = Request.QueryString["Goodid"];
      TextBox24.Text = idValue1;
      /////以上为第一个网页传过来的值,给了TextBox24
      }
      }Goodid  与  Googid  不一样啊
      

  8.   

    该叶面内还有一些其他的textbox的值也在postback时给冲掉了,textbox本来是手工录入的
      

  9.   

    该叶面内还有一些其他的textbox的值也在postback时给冲掉了,textbox本来是手工录入的
      

  10.   

    名子不一样
    string idValue = Request.QueryString["Googid"];
      TextBox10.Text = idValue;  /////以上为第一个网页传过来的值,给了TextBox10
      string idValue1 = Request.QueryString["Goodid"];