Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - How to Do this????
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to Do this????

 Post Reply Post Reply
Author
mzeb View Drop Down
Groupie
Groupie


Joined: 20 December 2002
Location: Pakistan
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote mzeb Quote  Post ReplyReply Direct Link To This Post Topic: How to Do this????
    Posted: 18 October 2003 at 4:34am

Dear Forums fellows!

i Really need a script! which will do something like this:

if i have a file let name it 'file.asp' if i have 1 another file 'file2.asp' so,

How should i attach this file to file1.asp, i like this:

file1.asp?page=2 if i enter this so how will it load the file2.asp?????

I m waiting for Reply! 

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2003 at 11:26am
That has been discussed a lot. Do a search on dynamic includes
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2003 at 2:59pm

yoyo.. you can try this..

this is the code for loading the querystring page
<%
dim page

page = Request.QueryString("page")
%>

if you have a content in file1.asp then place it after this code line

<%
if page = "" then
%>

Your pagecontent

<% else %>

this is for loading your file2.asp, file3.asp, file4.asp .....

<%
Response.Redirect"file" & page & ".asp"
%>

<% end if %>

 

i hope this will help you..

Back to Top
mzeb View Drop Down
Groupie
Groupie


Joined: 20 December 2002
Location: Pakistan
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote mzeb Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2003 at 7:35pm

Thanks Anthrax!

i m goint to test this :)

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2003 at 1:38pm
yeah.. do that
Back to Top
mzeb View Drop Down
Groupie
Groupie


Joined: 20 December 2002
Location: Pakistan
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote mzeb Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2003 at 11:42am

Anthrax!

it just redirect to the other page if i enter to files.asp?page=1 its directly re-direct to page1.asp.....

Can u please tell me how to do thiss:::::

if i enter files.asp?page=1 sure it will load page1.asp, but i want it in the default template, i mean in 1 header and footer!

Do you understand

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2003 at 12:19pm

have you heard of Server.Execute or Server.Transfer?? use that instead of Response.Redirect..

BUT there is a problem with that.. the included page wont load the variables from the including page.. but if you TRY!!!! you'll find a solution to that too..

you can also add the headers and sh*t to all your pages.. maybe thats the easiest way.. i think you will encounter LOADS of problems when using Server.Execute/Transfer.. especially if ur files are in different folders..

how long have you been doingASP??



Edited by AnthraX
Back to Top
mzeb View Drop Down
Groupie
Groupie


Joined: 20 December 2002
Location: Pakistan
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote mzeb Quote  Post ReplyReply Direct Link To This Post Posted: 22 October 2003 at 10:10am
Just Started in this year!

Because i just buy Windows Server in this Year :)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.