Travis Laborde Blog

play boxing daddy?

ASP.NET Skinnable Template Site

Erik Porter has posted a great example of how to build a "skinnable" site in ASP.NET here: http://weblogs.asp.net/eporter/posts/39571.aspx.

He provides code in VB.NET and C#.  The example is very basic, very readable, and not cluttered up with so many features that you will find it hard to pick out the bits you want to learn.

It doesn't come with any documentation, but as I said, the code is very short and sweet, and you should have no trouble tracing through what he's done.  If you've been wanting to build an ASP.NET site with base pages, templates, skins, etc and found other examples too complex to learn quickly, I highly encourage you to check out his example.  You'll be glad you did.

Legacy Comments


HumanCompiler
2003-11-26
re: ASP.NET Skinnable Template Site
Glad you like it, Travis and thanks so much for recommending it! :)

Ryan Rinaldi
2003-11-26
re: ASP.NET Skinnable Template Site
Just an FYI: ASP.NET 2.0 is supposed to have a master pages/skinnable architecture baked right in.

HumanCompiler
2003-11-26
re: ASP.NET Skinnable Template Site
Yup, MasterPages rocks! It's basically like what I created, except it has full design time support. It's going to be excellent, but I posted it, because Whidbey isn't due out 'til around fall of next year, so until then, feel free to check mine out! ;)

Ajay Sahu
2005-10-27
re: ASP.NET Skinnable Template Site
this is looking very nice

Shog
2005-11-11
re: ASP.NET Skinnable Template Site
i cant understand this:

while (this.Controls[0].Controls.Count > 0)
{
Control = this.Controls[0].Controls[0];
_Template.Content.Controls.Add(Control);
CheckForValidators(Control);
}

if u don't remove controls from the page this.Controls[0].Controls.Count will ever remain greater than 0 and so this should be an infinite loop... but it works, why?

saeed
2006-08-12
re: ASP.NET Skinnable Template Site
tanks