Webloging from Front Page

So now that my new weblog is up, I just need a way to post to it with ease. I started with a hidden page (since removed) that had an ActiveUpHtml TextBox control on it. But I wanted more. I wanted to work offline. I wanted a better HTML editing experience. I wanted a rich HTML editor! Luckily, I have Front Page. I hacked up a macro to throw up a dialog to grab the entry title & description, then insert that info + the currently selected text as the weblog entry content into the database. Of course, the true bummer is that I had to do it all with ADO. šŸ˜¢ Talk about spoiled. ADO.NET does a much better job handling parameters. What I need is Office 11, with the Visual Studio Tools for Office! Unfortunately, it appears that only Word and Excel are supported in VS.NET 2003, but I could use Word to blog instead of Front Pageā€¦

DevHawk PageLayout Control

I couldnā€™t wait, I had to post the information on DevHawkā€™s PageLayout.

New and Improved DevHawk

Hello again! If you can read this, my new .NET based weblog system is working and my new site design is visible. I guess thatā€™s a good startā€¦

My nameā€™s Harry Pierson, a Senior Architect Evangelist on Microsoftā€™s National Architecture Team (yes, another ā€˜softie blogger). This is my personal site where I post my opinions and my code, in that order of regularity I suspect. I found out a few months ago that MSDN Magazine is going to publish an article of mine on ASP.NET in their March issue. Since Iā€™ll be supplementing the article with info on this site, I figured I had to get it all spiffy. Not being a designer myself, I lifted the design and spent most of my time on the ASP .NET implementation. So far, Iā€™m pretty happy with it. Menus are driven from an XML file, making them easy to manage. The weblog itself is stored in a SQL 2000 database. Thatā€™s overkill I know, but I tend to subscribe to the Dilbert philosophy of ā€œWe always build a databaseā€. I built a multi-user weblog system on top of SQL, so I just used a stripped down version for this site.

I realized very quickly that I wanted to enforce a consistent look and feel across all my web pages. As my site provider doesnā€™t provide Content Management Server, I had to build my own tools. I created a templated PageLayout user control that has all the base page content, and provides three templated areas to put the content in (left, center and right). So my individual page code looks something like:

<uc1:PageLayout id="PageLayout1" runat="server">
    <LeftLayout>
        <uc1:LinkBox runat="server" id="LinkBox1"/>
    </LeftLayout>
    <CenterLayout>
        Some HTML Content Here
    </CenterLayout>
    <RightLayout></RightLayout>
</uc1:PageLayout>

I lose the visual designer, plus the ability to access embedded WebForm controls within page (they are children of the user control, not the page). But I encapsulate all the large modules of functionality (Weblog Entries, Weblog Calendar, Link Box, etc) in their own user controls anyway. Thus, the layout sections of the PageLayout control is simply a container for other user controls and simple HTML content. I even have multiple page layouts, one for the root and one for the Projects section of the site. So far, so good. Iā€™ll post some of the sample code in the project section soon.