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.
|
|
|
|
|
![]() |
||
Creating New Pages with asp....
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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.
|
|
|
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
What Cat said, also you'll need access to IIS to specify which asp page to use as the custom 404.
|
|
#4
|
||||
|
||||
|
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
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#5
|
|||
|
|||
|
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?
|
|
#6
|
|||
|
|||
|
Maybe you should state what you're trying to accomplish, cause your first and latest posts seem to be two different scenarios.
|
|
#7
|
|||
|
|||
|
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?
|
|
#8
|
|||
|
|||
|
All the shared servers I have accounts with will set up a custom error page for me.
|
|
#9
|
||||
|
||||
|
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
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#10
|
|||
|
|||
|
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. |
|
#11
|
||||
|
||||
|
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
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#12
|
|||
|
|||
|
start a new topic called "Selecting database records using the QueryString" and i'll explain it Court Jester.
|
![]() |
| Tags |
| creating, pages, asp |
| Thread Tools | |
|
|
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 |