Simple Regex to Remove Html tags

This is one of the simplest regex to remove html tags from some html text. I know its not the best but i’d argue that it’s one of the simplest. public static string RemoveHtml(string txt) {     return Regex.Replace(txt, @"<[^>]*>", ""); }

Formatting .NET DateTime to display Day suffix (st, nd ,rd , th)

I find it intersting that the MS did not have this by default as part of the Standard DateTime Format Strings for .NET. So I did my own thing..

Backing-up www.love2trade.com SQLServer DB 2005 from ASP.NET

Hi guys, This is the code you would use to trigger a full sql 2005 backup to a .BK file from a ASPX page, i use that on www.Love2Trade.com 

Get notified when your website throws an exception.

I used this code below in my website www.love2trade.com. This will send an email whenever an exception is thrown in your asp.net website, there is a 15 minutes throttle on the frequency of emails. In Application Start Class private static int _exceptionCount; private static DateTime _timeofLastException; private static object _timeofLastExceptionLock = new object(); private static [...]

Finding Distance between two points using longitude and latitude

This is a method that calulates a distance between two points. Let me know if you have a more acurate formula.