switch to ssl automatically

In this post I’ll explain how I transparently switch from http to https This same snipit can be put on any page as is and forces certain pages to be https. The nice thing about it is that the user can not edit the url back to http on a page that has this. All I did was put it on the login page and payment page. On page load the server examines the Request.IsSecureConnection flag and redirects...

February 5th, 2009 by B.Harding 

Ajax update panels and the errors that love them.

I have been using ajax a lot lately in my current project. I have noticed an annoying quirk. When a runtime error happens the page appears to hang. temprarily dissabling the update panel quickly reveals that the page isn’t really stuck, but there is an error that ajax is ignoring. I did some research and found a few good examples of how to handle the errors but most were in C# and some didn’t...

February 5th, 2009 by B.Harding 

Use Css to center a div

Using tables to layout a page is considered outdated. The “new” way to do it is with Div tags a alot of Cascading Style Sheets. To center a table is easy. You just set align=”center”. But what about when using the new way? When you want to center a div in the middle of the page use either a style or a css class to set the following attibutes: width: a fixed width; margin-right:auto; margin-left:auto; Note...

February 5th, 2009 by B.Harding