View Full Version : asp?param=text (how do i show the value of 'param' on the asp page)
ileech
04-14-2003, 02:12 AM
i am using an asp page to lookup data from a database, my question is: how do i display the parameter that was given/passed using ......pagename.asp?param=searchtext ......to the page. I want something like: Results for : [searchtext] to be displayed on the page showing the data returned to the user.
ie. is it possible to reference the ?param= by name in the asp page it was sent to
BoR|S
04-17-2003, 03:10 AM
As far as I understand your question, you should connect to a database and to take info from a table you wish from a specific column where text=paramtext...
ileech
04-17-2003, 07:41 AM
Thanks for the reply ...
Yes, you are correct, I could just show the data retrieved, however the 'searchtext' is used over multiple columns and could also be a substring of a column ie. field contains 'searchtext', I therefore cannot tell from the results exactly what the original searchstring was.
I have since discovered that the 'inc' file (_fpclass/fpdbrgn1.inc) used by Frontpage to parse the parameters for the database query is one way of getting at the searchstring, however this file is used by all the .asp pages in the site and is 'auto' generated by Frontpage itself.
I will keep trying ....
Ian
MikeParent
08-24-2003, 08:10 AM
To access passed variables/parameters:
If passed using HTTP POST (e.g. from a form):
Request.Form("param")
If passed using HTTP GET (e.g. in the URL as you have described)
Request.Querystring("param")
Note that you can actually pass parameters using both methads at the same time.
If you have a form as shown:
<form method="POST" action="process.asp?action=delete">
<input type=text name="data">
<input type=submit>
</form>
The values would be accessed using:
Request.Form("action")
Request.Querystring("data")
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.