Forums

ASP

This topic is locked

How does UDzone do this with ASP?

Posted 04 May 2002 09:31:27
1
has voted
04 May 2002 09:31:27 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 23:15:25
05 May 2002 23:15:25 Viktor Farcic replied:
Content is usually pulled from database. You can query such content using different variables. These variables can be QueryStrings (parameters from address). You can do something like: show record who's ID is equal to TypeId.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
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
&lt;!--#include file="&lt;%=myvariable%&gt;"--&gt;



UDzone experts, would you please enlighten me? Thanks!
Arnold
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
Replied 06 May 2002 13:00:50
06 May 2002 13:00:50 Arnold Ho replied:
Actually, I was trying to get my articles.asp(complete with header & footer) page to display a different .htm(which is the article) in the centre when different parameters passed to it.

I tried using SSI(see below) but that would never work...

Anyway, I found an alternative to SSI to achieve my needs.
I could use the FileSystemObject and response.Write object!! Hurray!!

Thank you all for replying me though! Thank you! Thank you! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>



<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Content is usually pulled from database. You can query such content using different variables. These variables can be QueryStrings (parameters from address). You can do something like: show record who's ID is equal to TypeId.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
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
&lt;!--#include file="&lt;%=myvariable%&gt;"--&gt;



UDzone experts, would you please enlighten me? Thanks!
Arnold
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 06 May 2002 13:43:59
06 May 2002 13:43:59 Viktor Farcic replied:
It can also be done via SSI. Content of SSI page can be placed inside of a function and included in the page. Later you'll need to call that function with some parameter. something like: FunctionDisplaySomething TypeID. In this case SSI is only included in the page and proccessed later when the function is called. I use something like this very often. Take a look at this address www.farcic.com/resources/resources.asp?mnuID=12
It's a good example of using different parameters inside of a SSI.

P.S. Site is still under construction so most of the things are still "out of order".

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Actually, I was trying to get my articles.asp(complete with header & footer) page to display a different .htm(which is the article) in the centre when different parameters passed to it.

I tried using SSI(see below) but that would never work...

Anyway, I found an alternative to SSI to achieve my needs.
I could use the FileSystemObject and response.Write object!! Hurray!!

Thank you all for replying me though! Thank you! Thank you! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>



<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Content is usually pulled from database. You can query such content using different variables. These variables can be QueryStrings (parameters from address). You can do something like: show record who's ID is equal to TypeId.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
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
&lt;!--#include file="&lt;%=myvariable%&gt;"--&gt;



UDzone experts, would you please enlighten me? Thanks!
Arnold
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager

Edited by - vfarcic on 06 May 2002 13:44:48
Replied 06 May 2002 17:35:21
06 May 2002 17:35:21 Matthijs Horsman replied:
Another option, i use quit often... (ASP/VB)
If you wanna call the inc_option_1.asp, do it by calling:

default.asp?m=option_1
&lt;%
Dim subject
subject = request.querystring("m"
%&gt;

&lt;%
if ( subject &lt;&gt; "" then
Select Case subject
Case "option_1"
%&gt;
&lt;!--#include file="inc_option_1.asp" --&gt;
&lt;%
Case "option_2"
%&gt;
&lt;!--#include file="inc_option_2.asp" --&gt;
&lt;%
End Select
else
%&gt;
&lt;!--#include file="inc_no_option.asp" --&gt;
&lt;%
end if
%&gt;

Hope this helps..

Grrrr
Matthijs
----------------
UD4/WY2K/IIS/ASP-VB

Reply to this topic