Yearly Archives: 2009

Date Formatting in C#

Cheat sheet <%= String.Format("{specifier}", DateTime.Now) %> Specifier Description Output d Short Date 08/04/2007 D Long Date 08 April 2007 t Short Time 21:08 T Long Time 21:08:59 f Full date and time 08 April 2007 21:08 F Full date and

Posted in C#

How to set fixed width web page sitting in centre of window for IE6x, Firefox, Safari and Chrome

Got a fixed width website and can’t get it to centrally align in the window in Internet Explorer? Or you can get it to centrally align in IE but not in any other browser? Fear not, it’s not your fault!

Posted in CSS

Disabling Validation for ASP.NET Server Controls

When using validation controls in your ASP.NET pages you might want to disable validation in certain situations. The most common example is when you want to disable validation for a Cancel button. You can instruct the ASP.NET server control to

Tagged with:
Posted in C#