NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Niels Larsen on May 26, 2009, 11:47:39 PM
-
Hi
I'm working with an app, connecting to several sql databases - selected through an id when the user call my site. But if the user forget og enter a bad id I want a static page to be displayed.
Where is the best place to put this call.
My connectionstring initiats in the webhandler - processlink.
Best regards
Niels Larsen
-
So, you want to override the default error page? Is that what you have in mind?
cheers
Bruce
-
I would like to give my users a page with all the valid links.
-
Hi Niels,
I've not had a chance to test this, but here's the theory.
a) you're making the connection early - in ProcessLink before parent call. Good.
By this stage the page "about to be served" is stored in 2 properties.
self.RequestFileName and
self.pagename
the one includes the path, the other not. ie
self.pagename = self.GetPageName(Self.RequestFileName)
So you can change the contents of self.RequestFileName
then call
self.pagename = self.GetPageName(Self.RequestFileName)
self.RequestFileName as I said contains the path and the filename.
So if you have an alternate procedure name, or static htm file, then use the
web folder path. eg
self.RequestFileName = clip(self.site.WebFolderPath) & '\heydude.htm'
self.pagename = self.GetPageName(Self.RequestFileName)
Cheers
Bruce
-
Hi Bruce
It works - great!
Thanks.
/Niels