Posted on September 30, 2008 by ash
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, @"<[^>]*>", "");
}
Filed under: Technical | Tagged: .net, html, regex, tags, xml | 2 Comments »
Posted on March 4, 2008 by ash
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..
Filed under: Technical | 3 Comments »
Posted on January 17, 2008 by ash
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
Filed under: Technical | Leave a Comment »
Posted on November 5, 2007 by ash
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 object _exceptionCountLock = new object();public static [...]
Filed under: Technical | 3 Comments »
Posted on November 2, 2007 by ash
This is a method that calulates a distance between two points. Let me know if you have a more acurate formula.
Filed under: Technical | Tagged: ash, Distance | 1 Comment »