ASP/ VbScript Stats:

How to support the site


Site Wide Message: (current site time 9/5/2010 11:55:32 PM EDT)
  • We want your input! One of our sponsors wants to know your opinion about development related issues. Click here to tell us what you think.
  • Are you an emerging/young developer (aged 18-30)? If so, would you like the chance to affect future developer tools and products?
    If so, then click here to give your feedback.
 

Template Class

Print
Email
winzip icon
Submitted on: 2/21/2003 12:08:58 AM
By: Nick DelMedico  
Level: Intermediate
User Rating: By 4 Users
Compatibility:ASP (Active Server Pages), HTML

Users have accessed this code  16861 times.
 
 
     Seperate logic from presentation. A VBScript class which allows you to define any number of parameters in an HTML template as well as define repeater blocks (for looping through RS's, etc.). Easy to unzip and run examples included. See ReadMe.txt for more info. Updated 2/23! Now has properties and methods for page caching! Updated 3/20! Use a key an unlimited amount of times. Updated 4/4.
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 3 submission(s) by this author

 

 
 Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
2/22/2003 4:45:24 AM

very nice!

I've done something similiar recently with XML/XSL but I really like this approach :)
(If this comment was disrespectful, please report it.)

 
3/6/2003 3:21:43 PMRaman Namboothiri

this is nice style
(If this comment was disrespectful, please report it.)

 
3/21/2003 12:33:42 AM

nice work with the regular expressions.. ;) just wanna ask if it supports subtemplating.. like subtemplate of a subtemlate of a template etc.
(If this comment was disrespectful, please report it.)

 
3/21/2003 3:35:08 AM

Xlent work here!
(If this comment was disrespectful, please report it.)

 
3/21/2003 3:37:01 AM

The author tailored me a solution for allowing multiple keys in one template:

in the class, find the sub named ParsePageVariables().

change the line that looks like this....

Call p_objDict.Add(p_arrTemp(0), p_arrTemp(1))

to look like this....

If Not p_objDict.Exists(p_arrTemp(0)) Then Call p_objDict.Add(p_arrTemp(0),
p_arrTemp(1))

Thanks Nick!
(If this comment was disrespectful, please report it.)

 
7/3/2003 10:57:10 AM

Very good class.
Thanks for sharing it!
(If this comment was disrespectful, please report it.)

 
7/16/2006 9:42:58 AMAmir Iqbal

how can i create a nested keys?, pls help
(If this comment was disrespectful, please report it.)

 
Add Your Feedback!

Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
To post feedback, first please login.