Database Documentation Generation in CodeSmith
page 4 of 7
by Jason Alexander
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 31863/ 70

Script Blocks - P4

Like I had mentioned earlier, one of the greatest strengths of CodeSmith is it's similarity to ASP.NET's style and syntax. In particular, the ability to paste in-line content and then use script blocks (<% %>) to handle any specific template logic and scripting.

In our case, we are going to put the base HTML in-line such as setting up the head, title, body tags, etc... This is ideal for any static content you want within your template.

Outside of that, though, we're going to have quite a bit of logic to navigate through our given database and spit out the respective information.

This "template-side" code must reside within a literal <script> block within the template. Much like ASP.NET, you have to specify <script runat="template"> as well, to make sure the template parser knows to build your given code into the template when it's built and compiled.

For the purposes of my article, we will have four methods. In the following pages we will cover each method in detail.


View Entire Article

User Comments

Title: Links problem   
Name: Ahmed Ammar
Date: 2009-08-02 10:20:41 AM
Comment:
Link for download full sample is broken
Title: SE   
Name: Kunal Shah
Date: 2005-08-04 6:50:59 AM
Comment:
Excellent






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-10-14 7:11:53 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search