Solved

Retrieve Variable from Hyperlink

Posted on 2011-09-26
3
184 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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/…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

630 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