var in address bar

F

Frank

Hi,
I'm experimenting with VB.NET. And I want to access the variable in the
address bar and can't find a short answer on the internet. It concerns a
line like:
www.site.com?somevar=somecontent
How do I get the value of somevar?
Yes, I know I can use sessionvars but I already know how that works.
Thanx
Frank
 
C

Cor Ligthert

Hi Frank,

This is a something classic method used by ASP (it is called the Get method)
are you sure you want to use that method?

Cor
 
H

Herfried K. Wagner [MVP]

* "Frank said:
I'm experimenting with VB.NET. And I want to access the variable in the
address bar and can't find a short answer on the internet. It concerns a
line like:
www.site.com?somevar=somecontent
How do I get the value of somevar?
Yes, I know I can use sessionvars but I already know how that works.

Are you talking about ASP.NET?
 
M

Mythran

Frank said:
Hi,
I'm experimenting with VB.NET. And I want to access the variable in the
address bar and can't find a short answer on the internet. It concerns a
line like:
www.site.com?somevar=somecontent
How do I get the value of somevar?
Yes, I know I can use sessionvars but I already know how that works.
Thanx
Frank

ASP.Net Server-Side method is to use the request object.

Dim someVar As String = Request.QueryString("somevar")

Mythran
 
B

Brian Henry

request.QueryString("variablename") this will return a string of what ever
the variable is set to with the =

variablename=value
 
F

Frank

thats it, thanx all.
Frank
Mythran said:
ASP.Net Server-Side method is to use the request object.

Dim someVar As String = Request.QueryString("somevar")

Mythran
 

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