1.11M Members

How i wan to pass the value from one page to other page?

 
0
 

I wan to tranfer the value barcode from abc.aspx to cde.aspx and display in other page

this is the code from abc.aspx

 <asp:HyperLink ID="hlBarcode" runat="server"   NavigateUrl='<%# "~/SearchStock.aspx?BC=" + Eval("Barcode")%>'  >

this is the code from cde.aspx.cs

 protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["Barcode"] != null)
                txtBarcode.Text = Request.QueryString["Barcode"];
        }

but my txtBarcode.Text cannot get anything...how to solved it?

 
0
 

You are referencing the wrong query string parameter. In your abc.aspx file, the query string parameter you used is BC, not Barcode. So just change line 3 to "BC".

 
1
 

hii..

your query string name is wrong. replace 'BC' instead of 'Barcode'

 protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["BC"] != null)
                txtBarcode.Text = Request.QueryString["BC"];
        }

thn it'll work fine.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article