Author |
Topic |
|
MadDog986
Starting Member
USA
3 Posts |
Posted - 27 February 2002 : 17:05:38
|
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
|
"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 |
|
|
Deleted
deleted
4116 Posts |
Posted - 27 February 2002 : 18:50:25
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 27 February 2002 : 20:22:46
|
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 |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 27 February 2002 : 23:08:20
|
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
|
|
|
es4725
Junior Member
205 Posts |
Posted - 28 February 2002 : 11:02:01
|
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 |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 28 February 2002 : 13:42:31
|
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
|
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 28 February 2002 : 18:21:54
|
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 |
|
|
|
Topic |
|