Click to See Complete Forum and Search --> : HttpRequest.QueryString Property


John_Doe
March 29th, 2001, 12:28 PM
Please be patient with my question, as I am a fairly new programmer. Does anyone know how to use this QueryString property? I am trying to build a webpage that will accept parameters in the url like this:
http://search.somesite.com/cgi-bin/search?query=monsters

I want to hard code in the base site:
'http://search.somesite.com/cgi-bin/search' and then allow a user to add the query=whatever. So technically, I would just need to read what query has been entered into the url, Right?

I was looking up this 'HttpRequest.QueryString Property' and thought I would be able to use this, but I'm not sure how to implement it into an aspx form page. Can someone please advise?

TIA!

Martin Perkins
April 4th, 2001, 11:14 AM
Hi,
To get the parameter for query use the following
string strPassedParameter = Page.Request.Params["query"];

and strPassedParameter will equal monster

Hope that helps you
Martin