Thread View: alt.lang.vb5.rumors
2 messages
2 total messages
Started by Neal Gran
Fri, 03 Apr 1998 00:00
How to pass parameters into vbscript from ASP page
Author: Neal Gran
Date: Fri, 03 Apr 1998 00:00
Date: Fri, 03 Apr 1998 00:00
15 lines
991 bytes
991 bytes
I am trying to pass information into a VBScript which is run from an active server page. There is information gathered outside of the script which needs to be processed inside the script, and I do not know how to access it inside the VBScirpt code. Any suggestions? Thanks Neal Gran Anisoft Corp neal@anisoft.com www.anisoft.com
Re: How to pass parameters into vbscript from ASP page
Author: Niall G
Date: Sat, 04 Apr 1998 00:00
Date: Sat, 04 Apr 1998 00:00
60 lines
2265 bytes
2265 bytes
Hi!
Theres quite a few different ways to pass and access parameters with asp
pages..
The easiest way is by simply adding a "?" and then passing each parameter
and its value (seperating each param with a "&")
eg.
"www.test.com\mypage.asp?Param1=1&fname=bob&lname=jones"
passes the params "Param1" with a value of "1" and
param2 with a value of "bob" and so on....
In your VBScript you can simply access it using the Querystring Method of
the ASP Request Object ...
<% 'Server Side VBScript
Public Param1, fname, lname
Param1 = Cint(Request.Querystring("Param1"))
fname = Request.Querystring("fname")
lname = Request.Querystring("lname")
etc...
%>
You can also use the Request object to retrieve values from submitted HTML
forms using the Request.Forms() collection (see MSDN Online).
Check out the Object Reference in the ASP roadmap or in any equipped MSDN
knowledgebase.
Hope this helps
Niall G
Pump Ultimate Media Productions
Melbourne, Australia
totalnrg@vic.bigpond.net.au
Neal Gran wrote in message <6g3q9d$kvc$1@client2.news.psi.net>...
>I am trying to pass information into a VBScript which is run from an active
>server page. There is information gathered outside of the script which
>needs to be processed inside the script, and I do not
>know how to access it inside the VBScirpt code.
>
>Any suggestions?
>
>
>Thanks
>
>Neal Gran
>Anisoft Corp
>neal@anisoft.com
>www.anisoft.com
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads