Feeds:
Posts
Comments

Archive for October, 2008

Send asynchronous mail using asp.net

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 [...]

Read Full Post »

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 [...]

Read Full Post »

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 [...]

Read Full Post »

Wrapping text

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.

Read Full Post »