Passing Arguments to ASP pages

Passing Arguments to ASP pages

I know that when using products like Cold Fusion, you can pass parameters to the page that does the work. Example: [*.cfm]. I have been trying to do this directly with ASP pages, but have not been successful. Can this be done?

You can use the QueryString to pass arguments to your ASP page. Say your ASP page (mypage.asp) is expecting to get two values, “arg1” and “arg2”. Then you can call your page as follows:



1. The question mark (?) signifies the start of your argument list.

2. Each argument key-value pair is delimited by the ampersand character (&).

3. Each argument key-value is of the form “name=value”.

Inside your ASP page (mypage.asp), you can simply access these variables by using:

var1 = Request("arg1")var2 = Request("arg2")


Share the Post: