Creating New Pages with asp....

This is a discussion on "Creating New Pages with asp...." within the Classic ASP section. This forum, and the thread "Creating New Pages with asp.... are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Aug 23rd, 2004, 05:08
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Creating New Pages with asp....

Hey Rob.. this is mainly for you. Cause your the only person that I know knows how to do this... How can I take information stored in a database and make it where when a person goes to a specific page, the database retrieves the data for that page. (The actual page does not exist). FE, how do I make page www.haeglodesigns.com/Tester.asp appear if there is no such physical page. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Aug 23rd, 2004, 07:37
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Since Rob's probably asleep I'll jump in.

You'd need to create a custom 404 error page (ASP) that looks at the attempted URL and then uses Server.Transfer to go to the page you want and passes a value to it with a querystring.

The page you transfer to would take the querystring value, look up the data using it, and put your page together for you.

There's a couple ways to set it all up depending on your specific goal.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Aug 23rd, 2004, 08:38
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
What Cat said, also you'll need access to IIS to specify which asp page to use as the custom 404.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Aug 23rd, 2004, 13:01
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,188
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
You cannot pass a querystring to a page using server.execute, or server.transfer...

You can however store a value in session variable, and retrieve it on next page
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Aug 23rd, 2004, 13:28
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
hrmm... Can I also use the main page and just keep refreshing it and use session variables to tell it what content to use? For example, on clicking the link it set a Session Variable equal to something and then sending you to the homepage again. Then the home page checks to see if you have that variable set up and then check to see if its Null. If it is Null it displays the home page and if it isn't it displays the page given to the Session Variable?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Aug 23rd, 2004, 19:12
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Maybe you should state what you're trying to accomplish, cause your first and latest posts seem to be two different scenarios.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Aug 23rd, 2004, 19:32
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
I use an Editor in ASP for people to use in their admin areas. I don't want them to have very much control at all over their website (cause most of them would ruin it...) so the editor store's what they write/design in the database. Then when the page loads it retrieves that "page" from the database and actually has "blah.asp" written on the end of the web address. That's what I wanted to do, but since I'm on a shared server I can't do the custom Error Scripts, so I'd have to just do this on the same page wouldn't I? And use Session Variables to determine which page the person is requesting?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old Aug 23rd, 2004, 23:06
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
All the shared servers I have accounts with will set up a custom error page for me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #9  
Old Aug 24th, 2004, 09:48
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,188
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Me too.

Court Jester...
what is wrong with haveing a url like:- content.asp?k=1321

The querystring value would obviously represent a specifiy record in the db to pull content from.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #10  
Old Aug 24th, 2004, 15:37
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
I dont even know how to do the ?k=1321.... lol

I bought an ASP book.. and it doesnt teach me everything... just the basics. And what it does teach me it's great for. It only takes like 1 page and you learn really quickly by doing it that way. But it has an example for everything and it breaks down that example. That's how you learn it. Which was totally awesome. It didn't get any further than creating a Randomizer... Which I really don't see any point in that. I mean how hard is it to do that? really... Any suggestions, Sites, Tips, Tricks, or books I should look into? Something that will take me through MS-SQL, SQL, and ASP would be the most perfect thing, but if just ASP that'll work good too.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #11  
Old Aug 25th, 2004, 09:04
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,188
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Court Jester..... have you never seen the sticky topic at the top of this ASP forum? That shows you by far the best book for use in learning ASP. It will cover everything you need and then some.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #12  
Old Aug 25th, 2004, 11:15
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
start a new topic called "Selecting database records using the QueryString" and i'll explain it Court Jester.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
creating, pages, asp

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "tag" system to find relevant "related" pages MrQuestions PHP Forum 3 Mar 20th, 2008 23:06
Javascript - Updating web pages with snippets from other pages Ydot JavaScript Forum 3 Jul 10th, 2007 14:38
Can't see changes in asp pages kazan Classic ASP 2 Sep 15th, 2005 16:57
Scripting Needed(adding pages to pages) Amari Classic ASP 1 Sep 4th, 2004 18:06
Creating, Deleting, And Editing Pages... courtjester Classic ASP 4 Aug 10th, 2004 12:06


All times are GMT. The time now is 14:10.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42