Solved

Retrieve Variable from Hyperlink

Posted on 2011-09-26
3
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AJAX ModalPopupExtender will Not Hide in Asp.net 1 35
IIS components 2 32
MS SQL and column defined as time 7 25
Send form to asp server side 6 26
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/…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

756 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