Jump to content
Xtreme .Net Talk

Recommended Posts

  • Moderators
Posted

This download illustrates how to create a base class from which all your aspx pages can inherit.

 

Why use templates?

If you�re designing a web site with more than a couple of pages then templates could be the answer. The benefits of well designed templates; getting rid of redundant code, easier to separate HTML from server-side scripts as well as the obvious, consistent look and reuse of UI code.

 

Why not use User Controls?

User Controls have their place as well. If anything they can be even easier to create than templates. Perhaps I�ll visit this topic at a later date.

Actually, I whipped up this sample because recently many were asking on how to use Includes in ASP.NET. So I figured why use Includes when you can be using Templates and User Controls.

 

Most of the code in the sample project is commented otherwise it should be self-explanatory.

bassicdemotemplatingasppages.zip

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...