Forums

This topic is locked

How does UDzone do this with ASP?

Posted 04 May 2002 09:28:54
1
has voted
04 May 2002 09:28:54 Arnold Ho posted:
How does UDzone and other sites do the following?

Example
www.udzone.com/categories.asp?TypeId=2
www.udzone.com/categories.asp?TypeId=3

"categories.asp" keeps the same layout.
"categories.asp" displays different Page Contents when the parameters are different


I know I cant do it using SSI since includeds are processed first
<!--#include file="<%=myvariable%>"-->



UDzone experts, would you please enlighten me? Thanks!
Arnold

Replies

Replied 05 May 2002 21:36:01
05 May 2002 21:36:01 David Thomas replied:
Im not exactly a UD Zone expert but here goes..

First,the TypeId=(number) is an id field in a database table which will keep a record of categories.

When this changes from
?TypeId=2
to
?TypeId=3
the designers at UD zone are creating a filtered recordset from the database to show only records from the category with an Id value of "3". The records from that table are then displayed on the page.
This is done in SQL queries and there is decent documentation in Ultradev 4 on this as well as an SQL primer.

The SQL query would be something along these lines....
SELECT *
from CATEGORIES
WHERE Categroy LIKE 'varCAtegory'

With the 'varCategory' being a variable like
Name = varCategory
Value = aspTutorials
RunTime Value = Request.QueryString("Category"

"where 'aspTutorials' is a field in a table called 'Category'"

This will then show only records relating to tutorials in ASP

**Experts please go lightly on me as i'm only new to it myself** <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>

I've just built my first Database site which also features database content like this, www.freejavascripts.co.uk

Hope this helps a little

"Nobody ever said this stuff was easy"

Reply to this topic