Erik Porter (gravatar)

Skinnable Template Site

Need a quick site up with a template and allows for skinning?  I went ahead and uploaded one.  If you're new to ASP.NET this should be a good start to get the base of a site going that you can build on.

Hopefully someone will get some use out of it...enjoy!  :)

Skinnable Template Site

10 Comments

  • Great work Erik! This is a really approachable example that I think will allow lots of people to learn these concepts much more easily that some of the other examples of this type out there.

  • Thank you very much, Travis! :)

  • http:// (gravatar)

    http:// said
    January 04, 2004

    If I add required field validators to the WebPages (inherited from BasePage), they dont seem to fire. Any idea why?? Thanks -Pritam

  • Yes, there is a bug in .NET 1.1 where the validators are not automatically readded back into the Page's Validators Collection. If you do this yourself in OnInit, it will fix the problem. Also, next time, leave your e-mail address or some way for me to contact you, so I can answer your question faster. Good luck! :)

  • http:// (gravatar)

    http:// said
    March 08, 2004

    I have the same problems as others seem to have but can't find the answer. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. during :- m_Template.Content.Controls.Add(Me.Controls(0).Controls(0)) Any ideas :)

  • sorry forgot email :)

  • http:// (gravatar)

    http:// said
    March 08, 2004

    I have solved the problem (well erik told me :) When VS.Net asks if you want to create an associated file when you load the template.ascx, JUST SAY NOOOOOOOOO. This caused the skinning to fail in many miserable ways. It added the BaseClasses code to the ascx and then I got duplicated declarations which is what gives the "System.NullReferenceException: Object reference not set to an instance of an object." error :)

  • Glad you go it! Sorry it was a pain!

  • http:// (gravatar)

    http:// said
    March 11, 2004

    Hi I have a little problem. When I add button or text box, the text - or html after the button is dysplaid before the template.

  • It might just have to do with where you have your controls placed, but I really can't tell without seeing your aspx...please send me an e-mail...no need to post a comment on here about it.

Your Information
Mrs. Gravatar (gravatar)

<-- It's a gravatar

your comment