ASP - Transfering variable data to new pages?

Associate
Joined
12 Aug 2004
Posts
1,009
Location
Glasgow, Scotland
Hi there :)

I'm going to make a page where they'll be two links called "Current News" which i'll link to, for example, index.asp?news=current and another called "Archived News" which will be index.asp?news=archived. I'll have the links being displayed in the left column and I want a user, when they click on either of these links for the right column the change to the relevant news information that they've requested.

I figured what i'd do is have the following in the left column:

Code:
<a href="index.asp?news=current">Current News</a>
<a href="index.asp?news=archived">Archived News</a>

and in the right column have something like:

Code:
If news="current" Then
[i]' show all the current news from the database[/i]
ElseIf news="archived" Then
[i]' show all the archived news from the database[/i]
EndIf

What i'm wondering is in php theres a function where like $news = GET['news']; so that the page knows what your talking about ... is there a way of doing this in (classic) asp?

Thanks,

Steven.
 
MaxPower said:
Code:
news=Request.QueryString("news")

To the best of my recolection

Yup :) If you're posting from forums using POST then it's Request.Form("fieldname").....just bear in mind that you can't upload files using ASPs built in Request object, you usually have to purchase a component to deal with file uploads. Also ASP can't deal with using &amp; as the separator between querystring variables.
 
Back
Top Bottom