Designing the Blog Display
12 Jun 2009 @ 01:54PM

Updated: 25 Jan 2010 @ 02:02PM
With the DB created, let's begin working on the code. We'll start with the general blog display. Since everything else in this application basically revolves around the display of blogs, it makes sense that we start there. So let's build the general page and styles we need. To start, we create a new Web Application in Visual Studio 2008 using .Net Framework 3.5. This is under File -> New -> Website, in case you've forgotten. I've called my new website cSharpBlog.

I won't be going through the full setup process. Basically I've just cleared out the default.aspx page and put all the code to create a basic page in the codefile. I've also used an external css file to hold all my styles. All of these items are available for download.

Let's take a look at what I came up with.


The Layout In IE7

Loading the page into Firefox yields the same result, meaning my CSS and HTML are (at least relatively) cross-browser compatible. All of the information you see above is hard coded in the html and is just a place holder. We'll be implementing them in code soon enough. However, it's quite handy to create everything up front so you know what it'll look like when you're done. Simply coding as you go can get messy.

As promised, I'm making the files available for download. You can grab all the images, the aspx and aspx.cs, and the style below:

Files To This Point

I let loose with CSS in this. Please feel free to peruse the css and html to see how I did things. If you have any questions, you can post them on my forums or Google it. However, since this tutorial is about C# and not CSS I'll refrain from explaining what I did.

Next we begin coding the backend.
Comments (0)