1,105,375 Community Members

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

Member Avatar
ku.heng.7
Newbie Poster
5 posts since Oct 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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?

Member Avatar
JorgeM
IT Addict
6,416 posts since Dec 2011
Reputation Points: 581 [?]
Q&As Helped to Solve: 963 [?]
Skill Endorsements: 172 [?]
Moderator
Featured
Sponsor
 
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".

Member Avatar
manuindia
Newbie Poster
2 posts since Dec 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
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 three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article