Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Is It Best to use index.asp?page=blah ?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MadDog986
Starting Member

USA
3 Posts

Posted - 27 February 2002 :  17:05:38  Show Profile  Visit MadDog986's Homepage
Do you find it better to use a 'single' page and then bring in content, ie.

index.asp?page=home

index.asp?page=art

Or to use individual pages ie.

home.asp
art.asp

Is there any difference in speed? Even if you got like a few 1000 lines or so? Does it load the whole files or just that part of the files the url calles for?

I like the idea of the one page because it can save the uploading pain and having to deal with a crap load of files. But i

----
MadDog
www.halflifextreme.com

Nathan
Help Moderator

USA
7664 Posts

Posted - 27 February 2002 :  18:16:02  Show Profile  Visit Nathan's Homepage
"But I" . . . what? Sounds like your trialed off

I have considered this for my own sites before. At the time I did alot of reasearch and concluded that its better to just have an inc_header and inc_footer on every page instead of including every page into a header and footer.

 Nathan Bales - Romans 15:13
---------------------------------

Snitz Exchange | Mod Resource
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 27 February 2002 :  18:50:25  Show Profile
Ditto! And if the pages are similar in data/design I'd use a database to keep page contents and use ASP to render it with N templates (template info in DB). If not, I use Nathan's way.


Think PinkPost v40b03 Patches
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 February 2002 :  20:22:46  Show Profile  Send ruirib a Yahoo! Message
My feelings exactly. All the common parts should be reused whenever possible. On my site I reuse both top and bottom and also most of my lef side Javascript menus. But content goes into its own page. Much easier to handle, I think.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 27 February 2002 :  23:08:20  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
all this is true, but one other thing i guess i will point out incase someone does not know, if you use include files and do something like this...


If strPage="config" Then
%>
<!-- #include file="../config/config.asp" -->
<%
ElseIf strPage="functions" Then
%>
<!-- #include file="../config/inc_functions.asp" -->
<%
ElseIf strPage="top" Then
%>
<!-- #include file="../config/inc_top.asp" -->
<%
Else
%>
<!-- #include file="../config/inc_footer.asp" -->
<%
End If
%>


The above code will load all 4 of the include files into the page, then it will process the asp page and only output which if statement is used. Hopefully this makes since on why not to use include files this way.

Brad
Web Hosting with SQL Server @ $24.95 per month
Snitz Mod Archive

Go to Top of Page

es4725
Junior Member

205 Posts

Posted - 28 February 2002 :  11:02:01  Show Profile
so if you do decide to use page.asp?link=whatever, what would be the best way to implement it?



Edited by - es4725 on 28 February 2002 11:03:42
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 28 February 2002 :  13:42:31  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
well you can do it that way, or just do it like...



If strPage="config" Then
%>
but the html code here for this page
<%
ElseIf strPage="functions" Then
%>
but the html code here for this page
<%
ElseIf strPage="top" Then
%>
but the html code here for this page
<%
Else
%>
but the html code here for this page
<%
End If
%>



the only reason i would see to do it this way is that you only have one file to upload or download, other then that, its just bad programming i think.

Brad
Web Hosting with SQL Server @ $24.95 per month
Snitz Mod Archive

Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 28 February 2002 :  18:21:54  Show Profile  Visit Nathan's Homepage
I would do it like this
select case resuest.querystring("link")
case "default"
call default
case "somthing else"
call somthing else
case "another something"
call another something
case else
call defualt
end select


 Nathan Bales - Romans 15:13
---------------------------------

Snitz Exchange | Mod Resource
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07