<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ASP.NET</title>
	<atom:link href="http://venkatdotnetexperiments.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://venkatdotnetexperiments.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Thu, 10 Jun 2010 05:45:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='venkatdotnetexperiments.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>ASP.NET</title>
		<link>http://venkatdotnetexperiments.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://venkatdotnetexperiments.wordpress.com/osd.xml" title="ASP.NET" />
	<atom:link rel='hub' href='http://venkatdotnetexperiments.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Interface</title>
		<link>http://venkatdotnetexperiments.wordpress.com/2010/06/09/interface/</link>
		<comments>http://venkatdotnetexperiments.wordpress.com/2010/06/09/interface/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 12:08:43 +0000</pubDate>
		<dc:creator>shrija138</dc:creator>
				<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[OOPS]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[OOPs]]></category>

		<guid isPermaLink="false">http://venkatdotnetexperiments.wordpress.com/?p=58</guid>
		<description><![CDATA[Multiple inheritance is not supported by c#. Instead of that we use interfaces for avoiding ambiguity in C++ , where the object of the class doesn&#8217;t know which method to call if the base classes have two methods of the same name. interfaces are defined in parent and implemented by derived class it have indexers, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=58&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Multiple inheritance is not supported by c#. Instead of that we use interfaces for avoiding ambiguity in C++ , where the object of the class doesn&#8217;t know which method to call if the base classes have two methods of the same name.<br />
interfaces are defined in parent and implemented by derived class it have indexers, methods and properties.</p>
<p>for example:</p>
<p><pre class="brush: csharp;">

interface Newinterface
{
void Mymethod();
}

interfaces are declared with keyword 'Interface' .

using System;

interface BaseInterface
{
void BaseToImplemen();
}

interface Childinterface:  BaseInterface
{
void childToImplement();
}

class Newchild : Childinterface
{
static void Main()
{
InterfaceImplementer iImp = new InterfaceImplementer();
iImp.childToImplement();
iImp.BaseToImplemen();
}

public void childToImplement()
{
Console.WriteLine(&quot;childToImplement() called.&quot;);
}

public void BaseToImplemen();
{
Console.WriteLine(&quot;BaseToImplemen();called.&quot;);
}
}

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venkatdotnetexperiments.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venkatdotnetexperiments.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venkatdotnetexperiments.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venkatdotnetexperiments.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venkatdotnetexperiments.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venkatdotnetexperiments.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venkatdotnetexperiments.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venkatdotnetexperiments.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venkatdotnetexperiments.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venkatdotnetexperiments.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venkatdotnetexperiments.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venkatdotnetexperiments.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venkatdotnetexperiments.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venkatdotnetexperiments.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=58&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venkatdotnetexperiments.wordpress.com/2010/06/09/interface/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bcb3eceaaa64d5a41c1d7e260e9b87e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shrija138</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating Windows Service in ASP.NET</title>
		<link>http://venkatdotnetexperiments.wordpress.com/2010/06/07/creating-windows-service-in-asp-net/</link>
		<comments>http://venkatdotnetexperiments.wordpress.com/2010/06/07/creating-windows-service-in-asp-net/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 09:03:47 +0000</pubDate>
		<dc:creator>venkatu2005</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Windows Service]]></category>
		<category><![CDATA[Schedule job or task]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://venkatdotnetexperiments.wordpress.com/?p=49</guid>
		<description><![CDATA[Good morning to All Now I am going to explain how to Create a windows Service in asp.net What is the purpose of Creating windows service in asp.net ? For ex: if you have the task of Sending birthday email to the members Automatically or  you are going to do some manipulation on particular day [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=49&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Good morning to All</p>
<p>Now I am going to explain how to Create a windows Service in asp.net</p>
<p>What is the purpose of Creating windows service in asp.net ?</p>
<p style="text-align:justify;">For ex: if you have the task of Sending birthday email to the members Automatically or  you are going to do some manipulation on particular day or do some manipulation on Consecutive intervals so at this situation you can go for Window service or even you can do birth email process through Sql Job Scheduling.</p>
<p>Now see how to create a simple service.</p>
<p><strong>Choose Create Project -&gt; VisualC# -&gt; Windows -&gt; Windows Service</strong></p>
<p><strong>Fig 1:</strong></p>
<div class="separator" style="clear:both;text-align:center;"><a style="margin-left:1em;margin-right:1em;" href="http://img46.imageshack.us/img46/7771/ws1v.jpg"><img class="aligncenter" style="border:0 none;" src="http://img46.imageshack.us/img46/7771/ws1v.jpg" border="0" alt="" width="475" height="328" /></a></div>
<p style="text-align:justify;">So once you give the windows Service Name it will show this &#8211; by default the serviceName is Service1 here i am changed to TimerService.</p>
<p><strong>Fig 2:</strong></p>
<div class="separator" style="clear:both;text-align:center;"><a style="margin-left:1em;margin-right:1em;" href="http://img594.imageshack.us/img594/2924/ws2.jpg"><img class="aligncenter" style="border:0 none;" src="http://img594.imageshack.us/img594/2924/ws2.jpg" border="0" alt="" width="394" height="287" /></a></div>
<p>Then Right Click on Service &#8211; Select -&gt; Add Installer</p>
<p><strong>Fig 3:</strong></p>
<div class="separator" style="clear:both;text-align:center;"><a style="margin-left:1em;margin-right:1em;" href="http://img21.imageshack.us/img21/4299/ws3ri.jpg"><img src="http://img21.imageshack.us/img21/4299/ws3ri.jpg" border="0" alt="" width="400" height="281" /></a></div>
<p style="text-align:justify;">Then the ProjectInstaller window show two Services like serviceProcessIntaller1 , serviceInstaller1 so you have to change some Properties for this service</p>
<p>Properties of serviceProcessIntaller1</p>
<p>Account &#8211; &gt; there are some 4 types of account are there as per the requirement</p>
<p>1) LocalService &#8211; for only particular computer</p>
<p>2) Network Service &#8211; to access resource on remote side ie: server</p>
<p>3) Local System &#8211; to works on local System</p>
<p>4) User &#8211; Based on User credentials</p>
<p>For Brief Description Check it :</p>
<p><a href="http://technet.microsoft.com/en-us/library/ms143504.aspx"><strong>http://technet.microsoft.com/en-us/library/ms143504.aspx</strong></a></p>
<p><strong>Fig 4:</strong></p>
<div class="separator" style="clear:both;text-align:center;"><a style="margin-left:1em;margin-right:1em;" href="http://img28.imageshack.us/img28/5791/ws4.jpg"><img src="http://img28.imageshack.us/img28/5791/ws4.jpg" border="0" alt="" width="400" height="285" /></a></div>
<p>Properties of serviceInstaller1</p>
<p>StartType :</p>
<p>1) Automatic</p>
<p>2) Manual</p>
<p>3) Disabled</p>
<p>You have to specify whether you are going to start this Service Manually or Automatically or Disabled the Service.then give the name for ServiceName Property , And give some Name for DisplayName property &#8211; this name will be displayed on your servicelist to identify your Service.</p>
<p><strong>Fig 5:</strong></p>
<div class="separator" style="clear:both;text-align:center;"><a style="margin-left:1em;margin-right:1em;" href="http://img210.imageshack.us/img210/2329/ws5.jpg"><img src="http://img210.imageshack.us/img210/2329/ws5.jpg" border="0" alt="" width="400" height="285" /></a></div>
<p>Now we going to write the code for Service on <strong>Service1.cs </strong></p>
<p>by default it has<strong> OnStart and OnStop Event</strong> &#8211; so this event occurs when service start and stop.</p>
<p><strong>using System.Timers;</strong></p>
<p>Add timer to do some manipulation on particular intervals</p>
<p>//Initialize the timer<br />
<strong>Timer timer = new Timer();</strong></p>
<p>so here is the code &#8211; what i am doing is create a method called AddToFile where i am adding the string to the file ie: on C Directory if the file is present it will write it on  or it will create a new file with the specified name and write the content on that file.</p>
<p>And onStart Event i am creating the Timer Elapsed event which called at every 1 minute so their i am adding another entry on that event.</p>
<p>Finally onStop Event i set the<strong> timer enabled = false</strong> and made last entry ie: Service stopped.</p>
<p><pre class="brush: csharp;">
protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.
//add line to the file
AddToFile(&quot;Make starting service&quot;);

//ad 1: handle Elapsed event
timer.Elapsed += new ElapsedEventHandler(OnElapsedTime);

//ad 2: set interval to 1 minute (= 60,000 milliseconds)
timer.Interval = 60000;

//ad 3: enabling the timer
timer.Enabled = true;
}

protected override void OnStop()
{
// TODO: Add code here to perform any tear-down necessary to stop your service.
timer.Enabled = false;
AddToFile(&quot;Make stopping service&quot;);
}

private void AddToFile(string contents)
{

//set up a filestream
FileStream fs = new FileStream(@&quot;c:\timelog.txt&quot;, FileMode.OpenOrCreate, FileAccess.Write);

//set up a streamwriter for adding text

StreamWriter sw = new StreamWriter(fs);

//find the end of the underlying filestream

sw.BaseStream.Seek(0, SeekOrigin.End);

//add the text
sw.WriteLine(contents);
//add the text to the underlying filestream

sw.Flush();
//close the writer
sw.Close();
}
private void OnElapsedTime(object source, ElapsedEventArgs e)
{
AddToFile(&quot;Make Another entry&quot;);
}

</pre></p>
<p>so once you written the code just press F5 to run it show this dialog</p>
<p><strong>Fig 6:</strong></p>
<div class="separator" style="clear:both;text-align:center;"><a style="margin-left:1em;margin-right:1em;" href="http://img169.imageshack.us/img169/3244/ws6b.jpg"><img src="http://img169.imageshack.us/img169/3244/ws6b.jpg" border="0" alt="" width="400" height="86" /></a></div>
<p>so you can start the service to start the service you have to install<strong> installutil.exe</strong> through commandline.</p>
<p>so go to Command Prompt on this Path.</p>
<p><strong>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727</strong></p>
<p>From here you have to install the service , once you compile the project exe file is created on bin folder.</p>
<p>here is the step to install the Service</p>
<p><strong>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727: IntallUtil &#8220;F:\WindowsService1\bin\Debug\WindowsService1.exe&#8221;</strong></p>
<p>so if you press enter. Service will be installed.</p>
<p>To <strong>UnInstall </strong>The service follow this line</p>
<p><strong>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\: IntallUtil  /u&#8221;F:\WindowsService1\bin\Debug\WindowsService1.exe&#8221;</strong></p>
<p>Once the Serice is installed it will be available on your Service list To check this follow this one</p>
<p><strong><em>Start -&gt; Control Panel -&gt; Administrative Tools -&gt; Services -&gt; then find the Service as you given while creating the windowsService ie: DisplayName : TimerService</em></strong></p>
<p><strong>Fig7:</strong></p>
<div class="separator" style="clear:both;text-align:center;"><a style="margin-left:1em;margin-right:1em;" href="http://img138.imageshack.us/img138/803/ws7a.jpg"><img src="http://img138.imageshack.us/img138/803/ws7a.jpg" border="0" alt="" width="400" height="272" /></a></div>
<p>so if you set the Startup Type &#8211; Automatic &#8211; the service started when the System boots, you can also start the service Manually Right Click on the Service -&gt; start. to start the service.</p>
<p>After the start the service check the C:\ Directory &#8211; you can check the file with the entry.</p>
<p>Happy Coding.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venkatdotnetexperiments.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venkatdotnetexperiments.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venkatdotnetexperiments.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venkatdotnetexperiments.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venkatdotnetexperiments.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venkatdotnetexperiments.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venkatdotnetexperiments.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venkatdotnetexperiments.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venkatdotnetexperiments.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venkatdotnetexperiments.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venkatdotnetexperiments.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venkatdotnetexperiments.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venkatdotnetexperiments.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venkatdotnetexperiments.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=49&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venkatdotnetexperiments.wordpress.com/2010/06/07/creating-windows-service-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083147d9cdc5419bb72bde57cb5eb843?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venkatu2005</media:title>
		</media:content>

		<media:content url="http://img46.imageshack.us/img46/7771/ws1v.jpg" medium="image" />

		<media:content url="http://img594.imageshack.us/img594/2924/ws2.jpg" medium="image" />

		<media:content url="http://img21.imageshack.us/img21/4299/ws3ri.jpg" medium="image" />

		<media:content url="http://img28.imageshack.us/img28/5791/ws4.jpg" medium="image" />

		<media:content url="http://img210.imageshack.us/img210/2329/ws5.jpg" medium="image" />

		<media:content url="http://img169.imageshack.us/img169/3244/ws6b.jpg" medium="image" />

		<media:content url="http://img138.imageshack.us/img138/803/ws7a.jpg" medium="image" />
	</item>
		<item>
		<title>Compress and Cache JSS and CSS Files in ASP.NET</title>
		<link>http://venkatdotnetexperiments.wordpress.com/2010/05/11/compress-and-cache-jss-and-css-files-in-asp-net/</link>
		<comments>http://venkatdotnetexperiments.wordpress.com/2010/05/11/compress-and-cache-jss-and-css-files-in-asp-net/#comments</comments>
		<pubDate>Tue, 11 May 2010 12:41:59 +0000</pubDate>
		<dc:creator>venkatu2005</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Compression JS]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://venkatdotnetexperiments.wordpress.com/?p=36</guid>
		<description><![CDATA[HTTPCombiner Credit goes to : http://code.msdn.microsoft.com/HttpCombiner In my last article i have discussed how to compress .aspx pages. Now we are going to see how to compress the Javascript and CSS file. Once the JS and CSS file is requested to the server and has been Cached. On next time You get it from Cache. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=36&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">HTTPCombiner</p>
<p>Credit goes to :<a href="http://code.msdn.microsoft.com/HttpCombiner" target="_blank"> <span style="color:#008080;"><strong>http://code.msdn.microsoft.com/HttpCombiner</strong></span></a></p>
<p>In my last article i have discussed how to compress .aspx pages. Now we are going to see how to compress the Javascript and CSS file.</p>
<p>Once the JS and CSS file is requested to the server and has been Cached. On next time You get it from Cache.</p>
<p>If i have 10 Javascript file and 10 Stylesheets , every time when you request the page &#8211; each time it requested the server for JS and CSS file ie: 10 request to server for CSS and 10 request to Server for JS, to avoid the issue we have to combine all the CSS as one file and all JS as one file. Therefore only one request is sent to the server to get the JS file so totally two request has been sent to the server one for JS and CSS.</p>
<p>There is some JS and CSS compressor tools available for free, these tools will<br />
compress or minify your JS or CSS file this is the one waybut we have to do manually.</p>
<p>If you want to compress the file at runtime, here i am using HTTPCombiner to make the all the CSS as 1 CSS and all the JS and 1 JS file.</p>
<p>It has one file ie: HTTPCombiner.ashx &#8211; to Compress the CSS and JS file.Place the file on your project.</p>
<p>Add these two line to include all your Css and Js file on your appSettings tag on your web.config, You can get the file name using key part of the appSettings.</p>
<p style="text-align:left;">
<p><pre class="brush: plain;">
&lt;add key=&quot;Set_Css&quot;
value=&quot;App_Themes/Default/Css1.css,App_Themes/Default/Css2.css&quot;/&gt;
 &lt;add key=&quot;Set_Javascript&quot;
value=&quot;Javascripts/Js1.js,Javascripts/Js2.js,
 http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js&quot;/&gt;
</pre></p>
<p>After that you have to give the cSS and JS path on the Page1.aspx.</p>
<p><pre class="brush: jscript;">
&lt;link   type=&quot;text/css&quot; rel=&quot;Stylesheet&quot;
 href=&quot;HttpCombiner.ashx?s=Set_Css&amp;t=text/css&amp;v=1&quot; /&gt;
&lt;script type=&quot;text/javascript&quot;
 src=&quot;HttpCombiner.ashx?s=Set_Javascript&amp;t=type/javascript&amp;v=2&quot; &gt;
 &lt;/script&gt;
</pre></p>
<p>Thats all, now you upload the file to server and check the JS,CSS file compressed (check the file length before and after applying this technique) using Fiddler tool or any other tools.</p>
<p>These are some tools to check Page response time.</p>
<p><a href="http://www.aptimize.com/" target="_blank"><span style="color:#333399;"><strong>http://www.aptimize.com/</strong></span></a></p>
<p><a href="http://websiteoptimization.com/services/analyze/" target="_blank"><span style="color:#333399;"><strong>http://websiteoptimization.com/services/analyze/</strong></span></a></p>
<p><a href="http://www.fiddler2.com/" target="_blank"><span style="color:#333399;"><strong>http://www.fiddler2.com/</strong></span></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venkatdotnetexperiments.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venkatdotnetexperiments.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venkatdotnetexperiments.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venkatdotnetexperiments.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venkatdotnetexperiments.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venkatdotnetexperiments.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venkatdotnetexperiments.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venkatdotnetexperiments.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venkatdotnetexperiments.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venkatdotnetexperiments.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venkatdotnetexperiments.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venkatdotnetexperiments.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venkatdotnetexperiments.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venkatdotnetexperiments.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=36&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venkatdotnetexperiments.wordpress.com/2010/05/11/compress-and-cache-jss-and-css-files-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083147d9cdc5419bb72bde57cb5eb843?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venkatu2005</media:title>
		</media:content>
	</item>
		<item>
		<title>Compress ASP.NET pages</title>
		<link>http://venkatdotnetexperiments.wordpress.com/2010/05/11/compress-asp-net-pages/</link>
		<comments>http://venkatdotnetexperiments.wordpress.com/2010/05/11/compress-asp-net-pages/#comments</comments>
		<pubDate>Tue, 11 May 2010 11:26:50 +0000</pubDate>
		<dc:creator>venkatu2005</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[HTTP compression]]></category>

		<guid isPermaLink="false">http://venkatdotnetexperiments.wordpress.com/?p=32</guid>
		<description><![CDATA[Good Evening to All. Here I am going to cover how to compress the .aspx pages. so there are no.of ways to compress the pages in asp.net 1) using IIS. 2) using Code ie: through HTTPCompress.dll i got the source code from codeproject.com. so i am going to share with you. There are two type [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=32&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Good Evening to All.</p>
<p>Here I am going to cover how to compress the .aspx pages.</p>
<p>so there are no.of ways to compress the pages in asp.net</p>
<p>1)  using IIS.<br />
2) using Code ie: through HTTPCompress.dll i got the source code from codeproject.com.<br />
so i am going to share with you.</p>
<p>There are two type of Compression ie: Deflate , GZIP. here i am going to use GZIP compression to compress the asp.net pages.</p>
<p>First Place the DLL file ie::HTTPCompress.dll to the Bin folder of your project.</p>
<p>Then you have to include some tag on web.config file</p>
<p><pre class="brush: xml;">
&lt;configSections&gt;
		&lt;sectionGroup name=&quot;Flanders&quot;&gt;
			&lt;section name=&quot;HttpCompress&quot; type=&quot;Flanders.Library.Modules.HttpCompress.Configuration, HttpCompress&quot;/&gt;
		&lt;/sectionGroup&gt;
	&lt;/configSections&gt;
&lt;Flanders&gt;
		&lt;HttpCompress  compressionType=&quot;GZip&quot;&gt;
			&lt;ExcludedPaths&gt;
				&lt;add path=&quot;NoCompression.aspx&quot; /&gt;
			&lt;/ExcludedPaths&gt;
			&lt;ExcludedMimeTypes&gt;
				&lt;add mime=&quot;image/jpeg&quot; /&gt;
			&lt;/ExcludedMimeTypes&gt;
		&lt;/HttpCompress&gt;
&lt;/Flanders&gt;
</pre></p>
<p>Here i am using GZiP Compression technique. there are two more inner Tags ie: ExcludePaths, ExcludeMimeTypes.</p>
<p>ExcludePaths &#8211; It includes the Page Name that don&#8217;t want to compress.</p>
<p>ExcludeMimeTypes &#8211; Include the mime types that dont want to compress the images..</p>
<p>By default images are compressed so no need to compress the image while using compression so our ExcludedMimeTypes tag should be like this.</p>
<p><pre class="brush: xml;">
&lt;ExcludedMimeTypes&gt;
		&lt;add mime=&quot;image/jpeg&quot; /&gt;
		&lt;add mime=&quot;image/jpg&quot; /&gt;
		&lt;add mime=&quot;image/png&quot; /&gt;
		&lt;add mime=&quot;image/gif&quot; /&gt;
&lt;/ExcludedMimeTypes&gt;
</pre></p>
<p>Finally we need to add the httpModules</p>
<p><pre class="brush: xml;">
	&lt;httpModules&gt;
			&lt;add&lt;/code&gt; name=&quot;HttpCompressModule&quot; type=&quot;Flanders.Library.Modules.HttpCompress.HttpModule,HttpCompress&quot;/&gt;
	&lt;/httpModules&gt;
</pre></p>
<p><a href="http://cid-bb48c4b3081b8f32.skydrive.live.com/self.aspx/.Public/ZipOutputstream.rar" target="_blank"><span style="color:#008000;"><strong>Download Source Code</strong></span></a></p>
<p><span style="color:#ff6600;"><strong>Credit goes to</strong> :</span></p>
<p><span style="color:#99ccff;"><strong>Ref: </strong></span><a href="http://www.codeproject.com/KB/aspnet/HttpCompress.aspx"> http://www.codeproject.com/KB/aspnet/HttpCompress.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venkatdotnetexperiments.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venkatdotnetexperiments.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venkatdotnetexperiments.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venkatdotnetexperiments.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venkatdotnetexperiments.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venkatdotnetexperiments.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venkatdotnetexperiments.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venkatdotnetexperiments.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venkatdotnetexperiments.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venkatdotnetexperiments.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venkatdotnetexperiments.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venkatdotnetexperiments.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venkatdotnetexperiments.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venkatdotnetexperiments.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=32&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venkatdotnetexperiments.wordpress.com/2010/05/11/compress-asp-net-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083147d9cdc5419bb72bde57cb5eb843?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venkatu2005</media:title>
		</media:content>
	</item>
		<item>
		<title>Postback not works when using HTTPCompression</title>
		<link>http://venkatdotnetexperiments.wordpress.com/2010/05/07/postback-not-works-when-using-httpcompression/</link>
		<comments>http://venkatdotnetexperiments.wordpress.com/2010/05/07/postback-not-works-when-using-httpcompression/#comments</comments>
		<pubDate>Fri, 07 May 2010 04:28:45 +0000</pubDate>
		<dc:creator>venkatu2005</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Error and Solutions]]></category>
		<category><![CDATA[HTTP compression]]></category>
		<category><![CDATA[postback not works]]></category>
		<category><![CDATA[scriptresource.axd]]></category>
		<category><![CDATA[webresource.axd]]></category>

		<guid isPermaLink="false">http://venkatdotnetexperiments.wordpress.com/?p=28</guid>
		<description><![CDATA[Some members asked this question on forums. When i am going to compress the .aspx pages using HTTPCompression, the postback will not works. Because it also compressing the Scripresource.axd, webresource.axd file. To make the postback works in your project  you do not compress the above two files, by adding these code. Solution: And one more [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=28&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some members asked this question on forums.</p>
<p>When i am going to compress the .aspx pages using HTTPCompression, the postback will not works. Because it also compressing the <strong><span style="color:#ff0000;">Scripresource.axd, webresource.axd</span> </strong>file.</p>
<p>To make the postback works in your project  you do not compress the above two files, by adding these code.</p>
<p><span style="text-decoration:underline;"><strong><span style="color:#003300;">Solution:</span></strong></span></p>
<p><pre class="brush: xml;">

........,

&lt;HttpCompress  compressionType=&quot;GZip&quot;&gt;
 &lt;ExcludedPaths&gt;
 &lt;add path=&quot;scriptresource.axd&quot; /&gt;
 &lt;add path=&quot;webresource.axd&quot; /&gt;
 &lt;/ExcludedPaths&gt;

....,

</pre></p>
<p>And one more thing don&#8217;t compress the images like jpg, gif, jpeg etc.. because its already compressed one. if you compress the image it will degrade the performance. you should the exclude the image from compression.</p>
<p><span style="text-decoration:underline;"><strong><span style="color:#003300;">Solution:</span></strong></span></p>
<p><pre class="brush: xml;">

..,

&lt;ExcludedMimeTypes&gt;
 &lt;add mime=&quot;image/jpeg&quot; /&gt;
 &lt;/ExcludedMimeTypes&gt;
 &lt;/HttpCompress&gt;

</pre></p>
<p>Thanks to all.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venkatdotnetexperiments.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venkatdotnetexperiments.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venkatdotnetexperiments.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venkatdotnetexperiments.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venkatdotnetexperiments.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venkatdotnetexperiments.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venkatdotnetexperiments.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venkatdotnetexperiments.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venkatdotnetexperiments.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venkatdotnetexperiments.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venkatdotnetexperiments.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venkatdotnetexperiments.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venkatdotnetexperiments.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venkatdotnetexperiments.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=28&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venkatdotnetexperiments.wordpress.com/2010/05/07/postback-not-works-when-using-httpcompression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083147d9cdc5419bb72bde57cb5eb843?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venkatu2005</media:title>
		</media:content>
	</item>
		<item>
		<title>Convert String to DateTime in ASP.NET</title>
		<link>http://venkatdotnetexperiments.wordpress.com/2010/05/06/convert-string-to-datetime-in-asp-net/</link>
		<comments>http://venkatdotnetexperiments.wordpress.com/2010/05/06/convert-string-to-datetime-in-asp-net/#comments</comments>
		<pubDate>Thu, 06 May 2010 09:14:57 +0000</pubDate>
		<dc:creator>venkatu2005</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Datetime]]></category>

		<guid isPermaLink="false">http://venkatdotnetexperiments.wordpress.com/?p=19</guid>
		<description><![CDATA[I saw the question repeatedly asking on forums ie: how to convert the String to datetime. even if someone give solution still the problems exists.., Error:  String is not recognized as a valid DateTime. Here i am giving the solution to overcome the problem. First make sure whether you entered is a valid date or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=19&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I saw the question repeatedly asking on forums ie: how to convert the String to datetime.</p>
<p>even if someone give solution still the problems exists..,</p>
<p><span style="text-decoration:underline;"><strong>Error</strong></span>:  <strong><span style="color:#ff0000;">String is not recognized as a valid DateTime</span></strong>.</p>
<p>Here i am giving the solution to overcome the problem.</p>
<p>First make sure whether you entered is a valid date or not because User may enter alphabets, special symbols etc.. so in order to avoid that , I have to validate the textbox. Here i am using the Regex to to validate the date.</p>
<p>This is my Article to <a href="http://www.codegain.com/articles/aspnet/validationcontrols/validate-date-with-regular-expression-in-Asp-Net.aspx" target="_blank">vaildate date using Regex</a></p>
<p><pre class="brush: csharp;">
try
{
 string sDate =&quot;06/05/2010&quot;;
// this the regex to match the date ie: dd/MM/yyyy
 string _dateExpression = @&quot;^((0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](?:19|20)\d\d)$&quot;;
 Regex chkDate = new Regex(_dateExpression);
 if ((chkDate.IsMatch(sDate))
 {
 // so if the date is valid and its matched you can store the date on DB or do some manipulatio.
 }
 else
 {
 // show invalid date
 }

}
 catch (System.FormatException ex)
 {
 // show invalid date
 }
catch(Exception ex1)
{
throw;
}
</pre></p>
<p>So if the user enter other than numbers it shows format exception to avoid this exception. once i caught the FormatException i am showing the Message to user ie:- input is not valid date or something.</p>
<p>Another small manipulation on DateTime</p>
<p><pre class="brush: csharp;">

DateTime sDate = new DateTime();

sDate = DateTime.Today; //  Here i am getting like this 5/6/2010

// So i want this format 05/06/2010  - for this i am using Format to Convert the Date as i Want.

string gDate = String.Format(&quot;{0:dd-MM-yyyy}&quot;, sDate);

</pre></p>
<p>Thanks to All.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venkatdotnetexperiments.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venkatdotnetexperiments.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venkatdotnetexperiments.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venkatdotnetexperiments.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venkatdotnetexperiments.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venkatdotnetexperiments.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venkatdotnetexperiments.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venkatdotnetexperiments.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venkatdotnetexperiments.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venkatdotnetexperiments.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venkatdotnetexperiments.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venkatdotnetexperiments.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venkatdotnetexperiments.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venkatdotnetexperiments.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=19&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venkatdotnetexperiments.wordpress.com/2010/05/06/convert-string-to-datetime-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083147d9cdc5419bb72bde57cb5eb843?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venkatu2005</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending Email Asynchronously using Asp.net</title>
		<link>http://venkatdotnetexperiments.wordpress.com/2010/04/28/sending-email-asynchronously-using-asp-net/</link>
		<comments>http://venkatdotnetexperiments.wordpress.com/2010/04/28/sending-email-asynchronously-using-asp-net/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 05:40:50 +0000</pubDate>
		<dc:creator>venkatu2005</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Send email asynchronously in asp.net]]></category>

		<guid isPermaLink="false">http://venkatdotnetexperiments.wordpress.com/?p=11</guid>
		<description><![CDATA[Good Morning to Everybody this is my First article. Now i am going to see how to send email Asynchronously, actually we send email normally using asp.net Example check here.. Send Email Using ASP.NET By default smtpClient has one method called SendAsync to send an email ansynchronously. so if you sending an email normally it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=11&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Good Morning to Everybody this is my First article.</p>
<p>Now i am going to see how to send email Asynchronously, actually we send email normally using asp.net Example check here..</p>
<p><a href="http://venkat-dotnetsnippets.blogspot.com/search/label/Email" target="_blank">Send Email Using ASP.NET<br />
</a></p>
<p>By default smtpClient has one method called SendAsync to send an email ansynchronously. so if you sending an email normally it will take some time for each mail sent. But if you send an email Asynchronously it will not wait for each mail sent it will do the other process , while mail sending is done at background process.</p>
<p>So Here is the code.</p>
<p><pre class="brush: csharp;">
//creating mail message object
 MailMessage mailMessage = new MailMessage();
 mailMessage.From = new MailAddress(&quot;venkat@gmail.com&quot;);
 mailMessage.To.Add(new MailAddress(&quot;msdotnettechies@gmail.com&quot;));
 mailMessage.CC.Add(new MailAddress(&quot;user1@gmail.com&quot;));
 mailMessage.Bcc.Add(new MailAddress(&quot;user2@gmail.com&quot;));
 mailMessage.Subject = &quot;Email Checking Asynchronously&quot;;
 mailMessage.Body = &quot;Email test asynchronous&quot;;
 mailMessage.IsBodyHtml = true;//to send mail in html or not

 SmtpClient smtpClient = new SmtpClient();//portno here
 smtpClient.Host = &quot;smtp.gmail.com&quot;;
 smtpClient.EnableSsl = true ; //True or False depends on SSL Require or not
 smtpClient.Credentials = new NetworkCredential(&quot;yourGmail@gmail.com&quot;, &quot;yourpassword&quot;);
 //smtpClient.UseDefaultCredentials = true; //true or false depends on you want to default credentials or not
 Object mailState = mailMessage;

 //this code adds event handler to notify that mail is sent or not
 smtpClient.SendCompleted += new SendCompletedEventHandler(smtpClient_SendCompleted);
 try
 {
 smtpClient.SendAsync(mailMessage, mailState);
 }
 catch (Exception ex)
 {
 Response.Write(ex.Message);
 Response.Write(ex.StackTrace);
 }

// this is the event called on main method
void smtpClient_SendCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
 {
 MailMessage mailMessage = e.UserState as MailMessage;
 if (e.Cancelled || e.Error != null)
 {

 Response.Write(e.Error.Message);
 Response.Write(e.Error.StackTrace);
 }
 else
 {
 Response.Write(&quot;Email sent successfully&quot;);
 }
 }

</pre></p>
<p>I checked this code it works fine.</p>
<p>Happy Coding.</p>
<p>Ref :  <a href="http://jalpesh.blogspot.com/2010/02/how-to-send-mail-asynchronously-in.html#comment-form" target="_blank">http://jalpesh.blogspot.com/2010/02/how-to-send-mail-asynchronously-in.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venkatdotnetexperiments.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venkatdotnetexperiments.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venkatdotnetexperiments.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venkatdotnetexperiments.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venkatdotnetexperiments.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venkatdotnetexperiments.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venkatdotnetexperiments.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venkatdotnetexperiments.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venkatdotnetexperiments.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venkatdotnetexperiments.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venkatdotnetexperiments.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venkatdotnetexperiments.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venkatdotnetexperiments.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venkatdotnetexperiments.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venkatdotnetexperiments.wordpress.com&amp;blog=13245862&amp;post=11&amp;subd=venkatdotnetexperiments&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venkatdotnetexperiments.wordpress.com/2010/04/28/sending-email-asynchronously-using-asp-net/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/083147d9cdc5419bb72bde57cb5eb843?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venkatu2005</media:title>
		</media:content>
	</item>
	</channel>
</rss>
