CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Mixing ASP and ASP + Templates

Print topic Send  topic

Author Message
Sam
Posted: 03/06/2002, 9:49 AM

Is there a trigger (trick?) that can be set to indicate "generate as ASP 2.0" or "generate as ASP + Templates" PER PAGE?

The only way I have thought to mix would be to generate the site to two different locations, copy/paste (and overwrite) the ASP into the ASP + template location. Would this work or is there an easier way?
Sam M
Posted: 03/06/2002, 10:10 AM

Hey Sam,
It can be done totally without html templates.

I had a problem about a week ago with an auction script I was writing.
I wanted it to support multiple templates, but they had to be switchable at a moments notice.

So here's what I did ,
or rather what you would do:

1. Add a field to your admin_user table called prefs, make it numeric
2. create a new table called templates
3. create three fields
a. prefs (autonumber)
b. header (memo)
c. footer (memo)

4. drop the content you want at the top of your page into header in this table
5. drop the bottom of the page into footer
6. check the prefs field and copy the number into your admin_user/prefs field

Now that the database is done,
remove the <html>,<head>,and <body> tags from your web app. And put the db field marked grab your template data. Your DB should do the rest. You would call it like you would call anything else inside a web application. Sessions are my prefered method, but it could be done with application variables, or even querystrings or form variables. It's up to you.

Cheers,
Sam M
Petr
Posted: 03/06/2002, 5:18 PM

Can you share wit us the auction site written with CC?
Sam M
Posted: 03/07/2002, 5:16 AM

Sure,
I see no reason why not.
The over all project isn't finished yet (it's one of those spare time things), but I would be happy to share the database, and the project file when I'm finished with it. If you're interested, contact me atcontact@sammoses.com

Cheers,
Sam

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.