Click here to Skip to main content
15,909,651 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: This should be tricky Pin
David Stone3-Jun-02 7:01
sitebuilderDavid Stone3-Jun-02 7:01 
GeneralConnection string Pin
Not Active29-May-02 8:04
mentorNot Active29-May-02 8:04 
GeneralRe: Connection string Pin
Mauricio Ritter29-May-02 12:18
Mauricio Ritter29-May-02 12:18 
GeneralRe: Connection string Pin
Not Active29-May-02 14:08
mentorNot Active29-May-02 14:08 
GeneralRe: Connection string Pin
Todd Smith5-Jun-02 13:52
Todd Smith5-Jun-02 13:52 
GeneralLittle Exclamation Points Pin
Jamie Nordmeyer29-May-02 6:47
Jamie Nordmeyer29-May-02 6:47 
GeneralTemplate Driven Website Using ASP Pin
mrhsean28-May-02 18:53
mrhsean28-May-02 18:53 
GeneralRe: Template Driven Website Using ASP Pin
Paul Watson29-May-02 0:44
sitebuilderPaul Watson29-May-02 0:44 
mrhsean wrote:
Is anyone familiar with how to make an ASP template site.
Would this require making an Application for IIS? or no?


The common way is to use INCLUDE files.

You have your template code in seperate INCLUDE files which are then included into the content pages.

e.g.

Your template files:

header.asp
<html>
 <head>
  <title><%=strTitle%></title>
 </head>
<body>


menu.asp
<table align="left">
 <tr>
  <td>
   <a href="default.asp">Home</a><br>
   <a href="about.asp">About</a>
  </td>
 </tr>
</table>


footer.asp
  <p>Copyright Joe Schmoe</p>
 </body>
</html>


Now your pages:

default.asp
<%
 Dim strTitle
 strTitle = "Home"
%>
<!-- #include file="header.asp" -->
<!-- #include file="menu.asp" -->
  <h1>Welcome to my page</h1>
  <p>Hi, blah blah balhb albhablahb</p>
<!-- #include file="footer.asp" -->


about.asp
<%
 Dim strTitle
 strTitle = "About"
%>
<!-- #include file="header.asp" -->
<!-- #include file="menu.asp" -->
  <h1>About Us</h1>
  <p>Hi, blah blah balhb albhablahb some other content</p>
<!-- #include file="footer.asp" -->


The above will have two content pages called about.asp and default.asp. Both use the header.asp, menu.asp and footer.asp template files which wrap around the individual content for each page.

You can then edit the menu.asp file and it will be reflected in both the home and about pages.

Hope that is what you meant by templates Smile | :)

regards,
Paul Watson
Bluegrass
Cape Town, South Africa

The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge

Tim Smith wrote:
Over here in the third world of humor (a.k.a. BBC America),

peterchen wrote:
We should petition microsoft to a "target=_Paul" attribute.
GeneralFrontpage Pin
HoldMe28-May-02 5:31
HoldMe28-May-02 5:31 
Generalsorry for my interrupt! Pin
tiaozi28-May-02 3:04
tiaozi28-May-02 3:04 
GeneralRe: sorry for my interrupt! Pin
Michael P Butler28-May-02 3:08
Michael P Butler28-May-02 3:08 
GeneralThis forum Pin
27-May-02 23:31
suss27-May-02 23:31 
GeneralRe: This forum Pin
tiaozi28-May-02 3:09
tiaozi28-May-02 3:09 
GeneralRe: This forum Pin
Michael P Butler28-May-02 3:42
Michael P Butler28-May-02 3:42 
GeneralRe: This forum Pin
29-May-02 1:44
suss29-May-02 1:44 
GeneralPassword textbox Pin
Not Active27-May-02 12:00
mentorNot Active27-May-02 12:00 
GeneralRe: Password textbox Pin
Philip Patrick27-May-02 21:03
professionalPhilip Patrick27-May-02 21:03 
GeneralRe: Password textbox Pin
Not Active28-May-02 2:51
mentorNot Active28-May-02 2:51 
GeneralWriting Application Mappings for new file types on a ASP.NET server Pin
Domenic Denicola27-May-02 6:12
Domenic Denicola27-May-02 6:12 
GeneralRe: Writing Application Mappings for new file types on a ASP.NET server Pin
Richard Deeming7-Jun-02 0:36
mveRichard Deeming7-Jun-02 0:36 
GeneralRe: Writing Application Mappings for new file types on a ASP.NET server Pin
Domenic Denicola7-Jun-02 3:24
Domenic Denicola7-Jun-02 3:24 
GeneralRe: Writing Application Mappings for new file types on a ASP.NET server Pin
Richard Deeming9-Jun-02 22:53
mveRichard Deeming9-Jun-02 22:53 
GeneralASP Image display in Variable Pin
Sameer Maggon26-May-02 19:17
Sameer Maggon26-May-02 19:17 
GeneralRe: ASP Image display in Variable Pin
Philip Patrick27-May-02 6:41
professionalPhilip Patrick27-May-02 6:41 
Generalasp:image Pin
Mazdak26-May-02 7:17
Mazdak26-May-02 7:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.