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?

Recommended Answers

All 2 Replies

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".

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.