Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Retrieve Variable from Hyperlink

Posted on 2011-09-26
3
Medium Priority
?
187 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 2000 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

Industry Leaders: 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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

664 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