Reading URL arguments passed via Hyperlink

H

Hugh O

Hi,
I am implementing an internet app via Visual Studio.Net 2003 using VB.Net.
There are numerous references within the Help facilities for using or
passing data between Internet pages via Hyperlink arguments or parameters.

example
http://www.something.com/exam.aspx?i=387964908&m=2347&rr=y&source=hon999

However, I have not been able to find any documentation or help on how the
called page actually can retrieve or read those arguments or parameters. I
assume that it can be done in the pageload but what do you use to access the
calling URL or which command is used to read the arguments.

It would be great is someone could offer simple code examples. Maybe this
function is obvious to others, but it isn't to me. I just want to know what
arguments have been passed to the newly called page that I am loading.

Thanks,
hugh
 
H

Herfried K. Wagner [MVP]

Hugh O said:
I am implementing an internet app via Visual Studio.Net 2003 using
VB.Net. There are numerous references within the Help facilities for using
or passing data between Internet pages via Hyperlink arguments or
parameters.

example
http://www.something.com/exam.aspx?i=387964908&m=2347&rr=y&source=hon999

However, I have not been able to find any documentation or help on how the
called page actually can retrieve or read those arguments or parameters.
I assume that it can be done in the pageload but what do you use to access
the calling URL or which command is used to read the arguments.

Check out 'Request.QueryString'.
 
S

Siva M

Hi,

You use the Request.QueryString collection in the called page to access the
passed variables via URLs. In this case, for example:

Request.QueryString("i") will return 387964908 as a string. Similarly,
Request.QueryString ("rr") will return string y.

Hope this helps.

Hi,
I am implementing an internet app via Visual Studio.Net 2003 using VB.Net.
There are numerous references within the Help facilities for using or
passing data between Internet pages via Hyperlink arguments or parameters.

example
http://www.something.com/exam.aspx?i=387964908&m=2347&rr=y&source=hon999

However, I have not been able to find any documentation or help on how the
called page actually can retrieve or read those arguments or parameters. I
assume that it can be done in the pageload but what do you use to access the
calling URL or which command is used to read the arguments.

It would be great is someone could offer simple code examples. Maybe this
function is obvious to others, but it isn't to me. I just want to know what
arguments have been passed to the newly called page that I am loading.

Thanks,
hugh
 
H

Hugh O

Siva and Herfried,
Thanks a lot. Just what I needed. VB.Net is a neat language when you know
the correct verbs.

Thanks again
hugh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top