Current location: Hot Scripts Forums » Programming Languages » ASP » Dynamic page with asp please...


Dynamic page with asp please...

Reply
  #1 (permalink)  
Old 02-25-07, 04:44 AM
callmewhateveruwant callmewhateveruwant is offline
Newbie Coder
 
Join Date: Oct 2006
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Question Dynamic page with asp please...

Hi all;

I did research on the internet but couldnt find out how to make a script to create dynamic web page with asp.

Hmmm I'm trying to explain what it is...because my english isn't good enough.

For example:

I have Index.asp(including header and footer) web page and I also have many other pages like contact.asp, sitemap.asp in another Folder (called it Page folder).

So i would like to call these pages in Page folder out with the link like (URL address blocked: See forum rules)/index.asp?page=contact or (URL address blocked: See forum rules)/index.asp?page=sitemap. and if they are called, the content of contact.asp will replace in the BODY of index.asp instead of index.asp content.

How can i do that?

well if any of you know PHP then this is the example:

PHP Code:

<?php


$pagedir 
'./pages/';
$page $pagedir basename($_GET['page']) .'.php';

include((
file_exists($page) ? $page 'main.php'));
?>

or

PHP Code:

<?php

switch ($page) {
case 
"about"
include(
'about.php'); 
break; 
default :
include(
'main.php'); ?>
Please help

Thank you very much
Reply With Quote
  #2 (permalink)  
Old 02-25-07, 08:57 AM
koncept
Guest
 
Posts: n/a
the easiest way is the second option you posted
asp Code:
  1. <%
  2. 'aspcode here
  3. %>
  4. <!--#include file="myfile.asp"-->
  5. <%
  6. 'more asp code
  7. %>

if you are set on using the first method google, dynamic include asp. i do not recomend using it as it can pose some serious security risks to your site.

Last edited by koncept; 02-28-07 at 02:10 PM.
Reply With Quote
  #3 (permalink)  
Old 02-25-07, 04:20 PM
callmewhateveruwant callmewhateveruwant is offline
Newbie Coder
 
Join Date: Oct 2006
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
yes i know that kind of include file but what i want is dynamic web pages...

As you said it has some serious security risks to my site? Why ?So how do ppl can use dynamic web pages with asp?

Thanks for you time
Reply With Quote
  #4 (permalink)  
Old 02-25-07, 06:11 PM
koncept
Guest
 
Posts: n/a
many people that use dynamics use a database back-end. by using something like that a user would have the ability to access files you may not want them to have access to. if you want a dynamic site i would recommend using a database back-end
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[turnkey] Lyrics site - $149 (LEGAL) rightinpoint General Advertisements 0 10-22-06 04:33 AM
URGENT:: how to solve post method error on asp page in Linux & Apache Server? j14nhAo ASP 2 02-24-06 12:33 PM
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
run macro excel with ASP page.. sal21 ASP 3 09-02-05 06:50 PM
Classified Ads skipper23 Perl 2 12-30-03 03:43 AM


All times are GMT -5. The time now is 03:55 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.