Thursday, October 22, 2009

My first free ASP.Net CSS web template

Note: I've added a label: "Free Template" for all my posts relating to converting free CSS XHML web templates to Asp.Net web projects.

While watching TV for a couple evenings, I converted a simple CSS XHTML web template into a Asp.Net 2.0 project.

The template I converted I found on ThemeBot.com. I like ThemeBot.com because most of the web templates are covered by the Creative Commons license. The license gives you two explicit rights: you are free to share the template and you are free to adapt the template. The license(s) have either one condition: you must attribute the template, in the manner as specified by the author or two: attibute and Share Alike, where if you share your creation, you must also use this license (Or a similar one).

The template I altered was this one: sparkBB014. It is a simple template for a blog. Here is the link to the sparkBB014 Demo.

Now with all the prelimaries out of the way, here is what I did:

I wanted to achive a couple of things:

1 - Use a MasterPage
2 - Wrap the reusable/optional elements in UserControls
3 - Move all the data to the code behind so that users can easily be made dynamic.

So, I created a web project and added a master page to the project. Next I copied all the markup from between the body tags and copied it into the master page.

Then I pulled out each block of data and the surrounding markup out and replaced it with a ContentPlaceHolder. Then inside the Default.aspx for each ContentPlaceHolder I placed a corresponding Content tag and filled it with the data/markup I had just removed from the Master Page.

Once that was done, I started IDing and runat=servering html elements so that I could touch them programatically.

Seeing that the entire blog design scheme was repeated for each entry, I pulled the entire structure out into into own ascx UserControl.

And since I would not want the search area on every page I moved it as well to its own ascx UserControl.

Last but not least, I removed the actual data from the markup and coded the codebehind c# to dynamically load the data into the markup. So, here is the zip file containing the project and here is a link to the asp.net site hosted at 1&1. Please, tell me what you think!

Monday, October 19, 2009

One Year of "Old School Dot Net"

Well, it has been one year. I've posted about complex computer science problems and I've created and wrote about silverlight 2 games. And, I've blogged about everything in between.

When I started this blog I set some goals for myself. I wanted to blog an average of once a week, or a total of 52 posts as of this week. I only made it to 40. 41 would have be 80% of my goal, or a B, but at 40 I only grade myself at a c+.

I also wanted to write 12 articles for codeproject.com. I completed 0. And, last but not least, I wanted to present at a conference this year. I ... well ... I think I'll join TechMasters and try to work on my presentation skills.

For next year I will keep the same goals and hope to get an aggregate passing score.

Wednesday, October 14, 2009

free asp.net web templates

Note: I've added a label: "Free Template" for all my posts relating to converting free CSS XHML web templates to Asp.Net web projects.

Ok, Why are there no websites offering free asp.net web templates? Is there no market?

There are tons of websites offering free xhtml/css website templates. Nearly all of them have licenses that allow compete freedom to alter it as long as you give credit to the creator. So, nobody can say that there is no material.

So, is it because there is no need? The way I see an asp.net web template offering is an asp.net web project with a master page with ContentPlaceHolder's sprinkled throughout so that a user of the template could get an asp.net website up and running quickly.

I'm not talking about anything as detailed as the starter kits from Microsoft, just simple templates, like the ones all over the net, but configured for asp.net.

So, tell me, would a site like ... say ... freeaspnettemplates.com be a site that anyone would use? Tell me your opinion, you just may start me on a new hobby!