Solved

Retrieve Variable from Hyperlink

Posted on 2011-09-26
3
177 Views
Last Modified: 2012-05-12
I have passed a variable from one page to another but I don't know how to retrieve it.  My adress bar on my page displays http://mysite/notes.aspx?Item=12345

I want to set<asp:Label Text = the item number from above.
What is the code to do so.
Thanks.
0
Comment
Question by:sbdt8631
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 36602030
Please try this c# sample:

Code Behind:
int itemNO = 0;

itemNO  = Request.QueryString["Item"].ToString;
lblItem.text = itemNO.toString();


.ASPX:
<asp:Label ID="lblItem" runat="server" Text="Label" />
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36602054
Also please look at this article for more detail:

http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx
0
 
LVL 1

Author Closing Comment

by:sbdt8631
ID: 36708934
Thanks
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now