Sharing Session Variables between ASP and ASP.Net Pages

Two methods for sharing session variables between ASP and ASP.Net pages.

I’m working on a major ASP to ASP.Net conversion project that can only really be done one page at a time. One of the obstacles to doing it this way was sharing session variables between ASP and ASP.Net pages.
Most solutions to this common problem involve intermediary pages that write the session variables of one type into form variables and then from form variables back into session variables of the other type (See Peter A. Bromberg’s example on eggheadcafe.com).

Microsoft’s Billy Yuen’s solution uses SQL Server as a repository for session data, and provides custom objects for both ASP and ASP.Net to access the session data.

Ultimately, we abandoned this since the site’s use of session variables was minimal and there were other ways of solving the problems we were using session state for.

CSS Positioning – Return of the Browser Wars?

A la A List Apart, I have been updating my presentation layer coding techniques to be compliant with modern XHTML and CSS standards. While I can certainly appreciate that adhering to these standards results in cleaner code that is easier to maintain, I have found that where element posisitioning is concerned I end up mired in a cross-browser compatibility nightmare the likes of which I haven’t been in since the days of the browser wars. Using nested HTML tables for page layout always bothered me in that it violated the principle of seperating content from structure and presentation. However, using CSS floating (I don’t use absolute positioning) to make a multiple-column page layout takes some masterful coding and/or use of hacks to make it work in multiple browsers! At least browsers can agree on how to render a table. Ever notice how so many of these starndards-compliant sites display all their text in one column centered on the page?

Below are some good resources on the subject, and some code generators for css layouts (the whole notion of a code generator for something as simple as a 3 column layout can take some getting used to – and don’t even think about more than 3 columns). Unfortunately, I wasn’t always successful in backing this code into existing site templates that I’ve made. So until I master the dreaded CSS float, I think I’ll have to keep the occasional table around for layout purposes.

CanVS Macros Save You from Carpal Tunnel?

I am currently writing my ASP.Net pages in VB.Net since my client comes from the ASP/VBScript tradition and the VB syntax is more familiar to them. It hasn’t taken long for me to miss the terse syntax of C#, especially since I have mild tendonitus and typing all those End X is killing me. Properties are the worst. Even though VS.Net will complete properties that you start in VB, you still have to write one line for each to get them started. So I looked to the web for a solution to this problem, and low and behold, I found this great article by Scott Mitchelle on using VS.Net macros to write properties.

I took this concept and expanded it by writing a macro that will write the property shells for all the private member reocords you have selected. Click here to download the macro.

waysonweb.com 2.0 (coming soon…)

I bet you can’t wait! Here’s a sneak peak at the mock up Michelle and I working on with Photoshop.

I bet you can’t wait. Actually, since I’m the only person that reads this site, and I know I can’t wait, then it turns out I’m right! My wife is helping me out with the graphic design (since I am completely lacking in that department) and I’m working on the new site architecture. Here’s a sneak peak at the mock up we’re working on with Photoshop.

Once we’re happy with the design, I get to try and make my first (and hopefully last) Word Press Theme in order to bring this blog in visual alignment with the rest of the site. I spent some time today looking for inspiration from the WordPress Theme Viewer, and I have to say my favorite based on name alone would have to be Yaaarr, tis me blog!

Ways to Run Multiple Web Sites on XP Professional

This article lists more than one way to run multiple web sites in IIS on a non-Server edtition of XP (i.e. Professional or Home). Previously I thought that this was not possible, but it turns out the limtation is in the IIS Admin Console GUI – not Windows – although Windows still will not let you run more than one site siultaneously. I downloaded and installed IIS Admin, and it is working great.

Why would you want to do this anyway? Well, in my case, I am completely re-architecting a site for my client, but I need to maintain the current version and we only have one development server and it is running XP Professional. IIS Admin allows me to set up and work on both sites on the development server. Since I can only have one running at I time and most of my time is spent creating the rearchited site, I keep it running by default. Whenever I need to make a change to the existing site, I just start it in IIS Admin, make and test the changes, and then upload them to the production server, and then switch back.