Print Page | Close Window

How to Do this????

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=6524
Printed Date: 31 March 2026 at 4:31pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: How to Do this????
Posted By: mzeb
Subject: How to Do this????
Date 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! 




Replies:
Posted By: michael
Date Posted: 18 October 2003 at 11:26am
That has been discussed a lot. Do a search on dynamic includes

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Semikolon
Date 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..



Posted By: mzeb
Date Posted: 18 October 2003 at 7:35pm

Thanks Anthrax!

i m goint to test this :)



-------------
http://www.batkhela.com - Batkhela.com


Posted By: Semikolon
Date Posted: 19 October 2003 at 1:38pm
yeah.. do that


Posted By: mzeb
Date 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



-------------
http://www.batkhela.com - Batkhela.com


Posted By: Semikolon
Date 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??



Posted By: mzeb
Date Posted: 22 October 2003 at 10:10am
Just Started in this year!

Because i just buy Windows Server in this Year :)


-------------
http://www.batkhela.com - Batkhela.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net