Send mail is an important and common feature in asp.net. using system.net.mail namespace we can send mail. In that article my main concert is to show how shall we send mail asynchronously, as for a bulk of mail sending asynchronous mail send is very important and asp.net have that feature in it.
I had written a [...]
Archive for October, 2008
Send asynchronous mail using asp.net
Posted in C#.NET, tagged ASP.NET on October 30, 2008 | 5 Comments »
Convert HTML data to text data
Posted in C#.NET on October 18, 2008 | Leave a Comment »
I was reading httpwebresponse data and get the basic data from the html data. So i need to remove all html tag, script tags, style tags from page to get original text data. So use a simple regular expression to remove tags. this regular expression was simple like that.
Regex.Replace(mainData,@”<scripts[^>]*>.*?</script>|<s*(?!/?(?:br?|i|p|u)b[^>]*>)[^>]*>”,””, RegexOptions.IgnoreCase | RegexOptions.Singleline) ;
I was working [...]
ASP.NET Caching with Cache Dependency on a File
Posted in C#.NET on October 17, 2008 | Leave a Comment »
Caching is a very important concept in programming . caching is a very nice technique to speed up processing. To increase performance of application caching is a great enhance.
One of my buddy razwan has written a very nice article on asp.net caching using cache dependency on file. You can follow this article to implement that [...]
Wrapping text
Posted in CSS, tagged Programming on October 16, 2008 | Leave a Comment »
Sometime we face problen to wrap text. this is a very easy solution to solve wrapping problem .
public string GetFormattedText(string str)
{
string[] parts = str.Split(new char[] { ‘ ‘ });
StringBuilder sb = new StringBuilder();
foreach (string s in parts)
{
sb.Append(Server.HtmlEncode(s));
sb.Append(” <wbr>”);
}
return sb.ToString();
}
In case of firefox its is more easier, just use white-space: -moz-pre-wrap in css style.

