How to send a parameter to an asp file 
Author Message
 How to send a parameter to an asp file

Hi all,
is there a way to send a parameter along with the http request to an ASP
file?

Thanks in advance for any help.

--
Steve Long



Mon, 05 Apr 2004 00:22:07 GMT  
 How to send a parameter to an asp file
Steve,

Sure is....easiest way is with query string as part of the URL:
"http://myserver/aspscript.asp?firstname=Steve&lastname=Long"

Then in the ASP script you grab the values by:
<%
Dim sFirst, sLast
sFirst = Request.QueryString("firstname")
sLast = Request.QueryString("lastname")
%>

Alternatively, if you can use a web page to submit information from a form
using the "POST" method:
<form name="frm" action="http://myserver/aspscript.asp" method="POST">
  <input type="text" value="Steve" name="firstname"/>
  <input tyep="text" value="Long" name="lastname"/>
</form>

Then in the ASP script:
<%
Dim sFirst, sLast
sFirst = Request.Form("firstname")
sLast = Request.Form("lastname")
%>

Hope this helps,
Jon


Quote:
> Hi all,
> is there a way to send a parameter along with the http request to an ASP
> file?

> Thanks in advance for any help.

> --
> Steve Long




Mon, 05 Apr 2004 19:03:07 GMT  
 How to send a parameter to an asp file
Thanks Jonathan,
that is very helpful. Do you know if there's a way to share these parameters
with a webclass that is hosted by the .asp file that received the
parameters?


Quote:
> Steve,

> Sure is....easiest way is with query string as part of the URL:
> "http://myserver/aspscript.asp?firstname=Steve&lastname=Long"

> Then in the ASP script you grab the values by:
> <%
> Dim sFirst, sLast
> sFirst = Request.QueryString("firstname")
> sLast = Request.QueryString("lastname")
> %>

> Alternatively, if you can use a web page to submit information from a form
> using the "POST" method:
> <form name="frm" action="http://myserver/aspscript.asp" method="POST">
>   <input type="text" value="Steve" name="firstname"/>
>   <input tyep="text" value="Long" name="lastname"/>
> </form>

> Then in the ASP script:
> <%
> Dim sFirst, sLast
> sFirst = Request.Form("firstname")
> sLast = Request.Form("lastname")
> %>

> Hope this helps,
> Jon



> > Hi all,
> > is there a way to send a parameter along with the http request to an ASP
> > file?

> > Thanks in advance for any help.

> > --
> > Steve Long




Tue, 06 Apr 2004 00:23:34 GMT  
 How to send a parameter to an asp file
Steve,

I've never worked with webclasses...so 'fraid I can't help you there.  I'm
sure there's some way to get what you need done, though....best wishes in
finding it,
Jon


Quote:
> Thanks Jonathan,
> that is very helpful. Do you know if there's a way to share these
parameters
> with a webclass that is hosted by the .asp file that received the
> parameters?



> > Steve,

> > Sure is....easiest way is with query string as part of the URL:
> > "http://myserver/aspscript.asp?firstname=Steve&lastname=Long"

> > Then in the ASP script you grab the values by:
> > <%
> > Dim sFirst, sLast
> > sFirst = Request.QueryString("firstname")
> > sLast = Request.QueryString("lastname")
> > %>

> > Alternatively, if you can use a web page to submit information from a
form
> > using the "POST" method:
> > <form name="frm" action="http://myserver/aspscript.asp" method="POST">
> >   <input type="text" value="Steve" name="firstname"/>
> >   <input tyep="text" value="Long" name="lastname"/>
> > </form>

> > Then in the ASP script:
> > <%
> > Dim sFirst, sLast
> > sFirst = Request.Form("firstname")
> > sLast = Request.Form("lastname")
> > %>

> > Hope this helps,
> > Jon



> > > Hi all,
> > > is there a way to send a parameter along with the http request to an
ASP
> > > file?

> > > Thanks in advance for any help.

> > > --
> > > Steve Long




Tue, 06 Apr 2004 05:41:33 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Passing a variable type parameter to an .asp file

2. linking to ASP (or whatever) file with a parameter

3. can send parameter to VB EXE file

4. How to send PLT files straight to a printer from ASP

5. Format Info From a Form in a ASP File To Be Sent In An e-Mail

6. How I get a file in the ASP and I send to SQL

7. How to send PLT files straight to a printer from ASP

8. Sending file to asp page with Inet Control in VB

9. ASP - ASP.NET quick question about including files..

10. how to send Send postscript file to Parallel port

11. Sending files to recipients in the explorer send to menu

12. Can't add parameter in asp

 

 
Powered by phpBB® Forum Software