在soft.aspx页面文件:
.....
<asp:textbox id="txtAddress" Runat="server"></asp:textbox>
<asp:textbox id="txtPostalcode" Runat="server"></asp:textbox>......
....
在soft.aspx.cs后台文件:            string ret = "order=" + order.ToString();
            ret += "&customer=" + getCustomerID();
            ret += "&time=" + time;
            ret += "&total=" + soft;
            ret += "&address=" + this.txtAddress.Text.Trim();
            ret += "&postalcode"+this.txtPostalcode.Text.Trim();其实在这里就为空了,但为什么一样的txtAddress不为空
            ret += "&phone" + this.txtPhone.Text.Trim();
            ret += "&Email" + this.txtEmail.Text.Trim();
            ret += "&Re" + this.txtRe.Text.Trim();
            Response.Redirect("confiremd.aspx?"+ret );在接受页面的后台代码confirmed.aspx.cs:
 orderID = Request.QueryString["order"].ToString();
                customerName = Request.QueryString["customer"].ToString();
                total = Request.QueryString["total"].ToString();
                time = Request.QueryString["time"].ToString();
                address = Request.QueryString["address"].ToString();
                post = Request.QueryString["postalcode"].ToString();
                phone = Request.QueryString["phone"].ToString();
                email = Request.QueryString["Email"].ToString();
                remank = Request.QueryString["Re"].ToString();老提示:没有将对象实例化.
我用单步调试,发现它的值为空,在software.aspx页面的时候我已经输入了值,也做了页面验证的,其他的值都可以获取到.譬如和它一样的控件Request.QueryString["address"].ToString();却可以获取传过来的值

解决方案 »

  1.   

    Response.Redirect("confiremd.aspx?"+ret ); 看看是不是有问题!!!
      

  2.   

         post = Request.QueryString["postalcode"].ToString(); 提示没有将对象引用实例
      

  3.   

    没有问题啊,有的话,为什么Request.QueryString["address"].ToString();又可以把值传过来
      

  4.   

    Response.Redirect("confiremd.aspx?"+ret )!=Response.Redirect("confiremd.aspx?mm="+ret )
      

  5.   

    问题自己已经找到,太粗心了 ret += "&postalcode"+this.txtPostalcode.Text.Trim();
    掉了个等号 ret += "&postalcode="+this.txtPostalcode.Text.Trim();
      

  6.   

    ret += "&postalcode"+this.txtPostalcode.Text.Trim();其实在这里就为空了,但为什么一样的txtAddress不为空 
    ret += "&phone=" + this.txtPhone.Text.Trim(); 
    ret += "&Email=" + this.txtEmail.Text.Trim(); 
    ret += "&Re=" + this.txtRe.Text.Trim();