Click to See Complete Forum and Search --> : How to do "index.asp?view=1234"


venomstyle
06-13-2005, 12:58 AM
I am trying to figure out how to do something like I see a lot of sites do...

something like www.url.com/index.asp?view=123

How would I go about setting something like that up. I am sure it is something simple, but I Can't find any tutorials on the net about doing it. I guess it would be easier to find tutorials on it if I knew what it was called.

Thanks in advance for all the help,

Venom

buntine
06-13-2005, 01:38 AM
It's called a QueryString. They are very easy to use in ASP.

URL: index.asp?view=123

Dim intID
intID = Request.QueryString("view")
Response.Write("ID = " & intID)

Regards.

venomstyle
06-13-2005, 02:08 AM
awesome! Thanks for telling me what is was called and giving me a small example. I have one more question for ya.

Let me see how I can explain my question without confussing myself. What I am trying to do is create for example a sounds page. In the database I have description, path, name etc. It has a Primary ID of lets say 1.

How would I make it to were I can just click on a link and have it auto create the page displaying all the sounds that have to do with ID 1? I just want to make like a custom page that tells it what to look lilke when it pulls. I just don't want to create a index page for every sound page. I rather just create one index page and then when someone ones to look at say 3south sounds they just click the link and it will automatically make the page.

I hope I am making sense to you. I know how to do like the quereies to pull the info from database etc. Just can't figure out how ot auto create page when link is clicked.

thanks for all the help,

Venom

buntine
06-13-2005, 02:23 AM
Yep. This is standard database programming. You will need to use the QueryString value to generate an SQL query, which, in turn, will supply you with the details you need to generate your page.

You will need to use a couple of ADO object, namely a RecordSet object and a Connection object. Here is a good tutorial on extracting data from a database with ASP and ADO: http://www.devpapers.com/article/182

Regards.