<?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/"
	>

<channel>
	<title>My Happy Moments &#187; Asp.net</title>
	<atom:link href="http://blogs.myhappymoments.com/category/programming/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.myhappymoments.com</link>
	<description>Just another weblog</description>
	<lastBuildDate>Thu, 15 Jul 2010 23:13:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Read a Web Page and send it as an HTML Email</title>
		<link>http://blogs.myhappymoments.com/2009/04/22/read-a-web-page-and-send-it-as-an-html-email/</link>
		<comments>http://blogs.myhappymoments.com/2009/04/22/read-a-web-page-and-send-it-as-an-html-email/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 01:43:46 +0000</pubDate>
		<dc:creator>Vish</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Vb.net]]></category>

		<guid isPermaLink="false">http://blogs.myhappymoments.com/?p=276</guid>
		<description><![CDATA[Recently I was asked to write a code to send entire Aspx page as an HTML mail using VB.Net. Private Function ReadAspxPage(ByVal url As String) As String Dim htmlPage As String Dim objResponse As System.Net.WebResponse Dim objRequest As System.Net.WebRequest = System.Net.HttpWebRequest.Create(url) objResponse = objRequest.GetResponse() Dim readpage As New System.IO.StreamReader(objResponse.GetResponseStream()) htmlPage = readpage.ReadToEnd() readpage.Close() Return htmlPage.toString() ]]></description>
			<content:encoded><![CDATA[<p>Recently I was asked to write a code to send entire Aspx page as an HTML mail using VB.Net.<br />
<code>Private Function ReadAspxPage(ByVal url As String) As String<br />
Dim htmlPage As String<br />
Dim objResponse As System.Net.WebResponse<br />
Dim objRequest As System.Net.WebRequest = System.Net.HttpWebRequest.Create(url)<br />
objResponse = objRequest.GetResponse()<br />
Dim readpage As New System.IO.StreamReader(objResponse.GetResponseStream())</p>
<p>htmlPage = readpage.ReadToEnd()<br />
readpage.Close()</p>
<p>Return htmlPage.toString()<br />
End Function</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.myhappymoments.com/2009/04/22/read-a-web-page-and-send-it-as-an-html-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to read HTML file onServer in ASP.Net</title>
		<link>http://blogs.myhappymoments.com/2009/04/22/how-to-read-html-file-onserver-in-aspnet/</link>
		<comments>http://blogs.myhappymoments.com/2009/04/22/how-to-read-html-file-onserver-in-aspnet/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 01:31:57 +0000</pubDate>
		<dc:creator>Vish</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Read File]]></category>
		<category><![CDATA[Vb.net]]></category>

		<guid isPermaLink="false">http://blogs.myhappymoments.com/?p=273</guid>
		<description><![CDATA[Private Function GetEmailTemplate(ByVal templateName As String) As String Dim sr As IO.StreamReader = New IO.StreamReader(System.Web.HttpContext.Current.Server.MapPath(templateName)) Dim body As String = sr.ReadToEnd() sr.Close() sr.Dispose() Return body End Function]]></description>
			<content:encoded><![CDATA[<p><code>Private Function GetEmailTemplate(ByVal templateName As String) As String<br />
        Dim sr As IO.StreamReader = New IO.StreamReader(System.Web.HttpContext.Current.Server.MapPath(templateName))<br />
        Dim body As String = sr.ReadToEnd()<br />
        sr.Close()<br />
        sr.Dispose()<br />
        Return body<br />
    End Function</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.myhappymoments.com/2009/04/22/how-to-read-html-file-onserver-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read all Mail Merge Field in an Collection.</title>
		<link>http://blogs.myhappymoments.com/2009/04/22/read-all-mail-merge-field-in-an-collection/</link>
		<comments>http://blogs.myhappymoments.com/2009/04/22/read-all-mail-merge-field-in-an-collection/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 00:37:49 +0000</pubDate>
		<dc:creator>Vish</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Mail Merge]]></category>
		<category><![CDATA[Vb.net]]></category>

		<guid isPermaLink="false">http://blogs.myhappymoments.com/?p=267</guid>
		<description><![CDATA[I was asked to read all Mail merge Files in an HTML Template and then perform a mail Merge. The MailMerge Fields were like ##[Field]##. So thought to use regex to find the fields. The biggest task for me was to write a regex for Matching ##[Merge Fields]##. This is the code that I ended ]]></description>
			<content:encoded><![CDATA[<p>I was asked to read all Mail merge Files in an HTML Template and then perform a mail Merge.<br />
The MailMerge Fields were like ##[Field]##.<br />
So thought to use regex to find the fields.</p>
<p>The biggest task for me was to write a regex for Matching ##[Merge Fields]##.<br />
<span id="more-267"></span><br />
This is the code that I ended with.</p>
<p bgcolor="red"><code>Private Function GetEmailMergeFields(ByVal body As String) As ListItemCollection<br />
Dim list As ListItemCollection = New ListItemCollection</p>
<p>Dim pattern As String = "##\[.*?\]##"<br />
Dim mymatches As System.Text.RegularExpressions.MatchCollection<br />
Dim myregex As New System.Text.RegularExpressions.Regex(pattern)</p>
<p>mymatches = myregex.Matches(body)<br />
For Each succ As System.Text.RegularExpressions.Match In mymatches<br />
list.Add(succ.Value)<br />
Next</p>
<p>Return list</p>
<p>End Function</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.myhappymoments.com/2009/04/22/read-all-mail-merge-field-in-an-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Use Code Behind to display text on Binding</title>
		<link>http://blogs.myhappymoments.com/2008/12/01/how-to-use-code-behind-to-display-text-on-binding/</link>
		<comments>http://blogs.myhappymoments.com/2008/12/01/how-to-use-code-behind-to-display-text-on-binding/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 08:46:38 +0000</pubDate>
		<dc:creator>Vish</dc:creator>
				<category><![CDATA[Asp.net]]></category>

		<guid isPermaLink="false">http://blogs.myhappymoments.com/?p=207</guid>
		<description><![CDATA[I had to display Yes or No based on databind this is how I did it. &#60;asp:Label ID=&#8221;IsUserActiveCheckBox&#8221; Text=&#8217;&#60;%# if(Eval(&#8220;IsUserActive&#8221;),&#8221;Yes&#8221;,&#8221;No&#8221;) %&#62;&#8217; runat=&#8221;server&#8221; /&#62; Also Bind will not work if you are databinding it. Here is another example where I used code behind. in Aspx : &#60;asp:RadioButtonList ID=&#8221;rbGLRSearch&#8221; runat=&#8221;server&#8221; RepeatDirection=&#8221;Horizontal&#8221; OnSelectedIndexChanged=&#8221;EnableCluster&#8221; AutoPostBack=&#8221;true&#8221; SelectedValue=&#8217;&#60;%# GetCheckBoxValue(Eval(&#8220;GLRSearch&#8221;)) %&#62;&#8217;&#62; &#60;asp:ListItem&#62;Yes&#60;/asp:ListItem&#62; ]]></description>
			<content:encoded><![CDATA[<p>I had to display Yes or No based on databind this is how I did it.</p>
<p>&lt;asp:Label ID=&#8221;IsUserActiveCheckBox&#8221; Text=&#8217;&lt;%# if(Eval(&#8220;IsUserActive&#8221;),&#8221;Yes&#8221;,&#8221;No&#8221;) %&gt;&#8217;<br />
runat=&#8221;server&#8221; /&gt;</p>
<p>Also Bind will not work if you are databinding it.</p>
<p><strong>Here is another example where I used code behind.</strong></p>
<p><strong><span style="text-decoration: underline;">in Aspx : </span></strong></p>
<p>&lt;asp:RadioButtonList ID=&#8221;rbGLRSearch&#8221; runat=&#8221;server&#8221; RepeatDirection=&#8221;Horizontal&#8221;<br />
OnSelectedIndexChanged=&#8221;EnableCluster&#8221; AutoPostBack=&#8221;true&#8221; SelectedValue=&#8217;&lt;%# GetCheckBoxValue(Eval(&#8220;GLRSearch&#8221;)) %&gt;&#8217;&gt;<br />
&lt;asp:ListItem&gt;Yes&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem&gt;No&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem&gt;N/A&lt;/asp:ListItem&gt;<br />
&lt;/asp:RadioButtonList&gt;</p>
<p><strong><span style="text-decoration: underline;">in code behind :</span></strong></p>
<p>Protected Function GetCheckBoxValue(ByVal bool) As String</p>
<p>If bool Is Nothing Then<br />
Return &#8220;N/A&#8221;<br />
ElseIf bool = True Then<br />
Return &#8220;Yes&#8221;<br />
ElseIf bool = False Then<br />
Return &#8220;No&#8221;<br />
End If<br />
Return True<br />
End Function</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.myhappymoments.com/2008/12/01/how-to-use-code-behind-to-display-text-on-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Top Must-Have Tools for an ASP.NET Developer</title>
		<link>http://blogs.myhappymoments.com/2008/11/19/some-top-must-have-tools-for-an-aspnet-developer/</link>
		<comments>http://blogs.myhappymoments.com/2008/11/19/some-top-must-have-tools-for-an-aspnet-developer/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 00:04:33 +0000</pubDate>
		<dc:creator>Vish</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://blogs.myhappymoments.com/?p=194</guid>
		<description><![CDATA[Came across this blogs. really good collection of tools. worth trying them. http://www.dotnetcurry.com/(X(1)S(ksuw3045ka04q3rcittjc0nk))/ShowArticle.aspx?ID=103&#38;AspxAutoDetectCookieSupport]]></description>
			<content:encoded><![CDATA[<p>Came across this blogs.</p>
<p>really good collection of tools.</p>
<p>worth trying them.</p>
<p><a href="http://www.dotnetcurry.com/(X(1)S(ksuw3045ka04q3rcittjc0nk))/ShowArticle.aspx?ID=103&amp;AspxAutoDetectCookieSupport=1">http://www.dotnetcurry.com/(X(1)S(ksuw3045ka04q3rcittjc0nk))/ShowArticle.aspx?ID=103&amp;AspxAutoDetectCookieSupport=1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.myhappymoments.com/2008/11/19/some-top-must-have-tools-for-an-aspnet-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Tips for ASP.NET Applications</title>
		<link>http://blogs.myhappymoments.com/2008/11/19/performance-tips-for-aspnet-applications/</link>
		<comments>http://blogs.myhappymoments.com/2008/11/19/performance-tips-for-aspnet-applications/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 23:21:49 +0000</pubDate>
		<dc:creator>Vish</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://blogs.myhappymoments.com/?p=191</guid>
		<description><![CDATA[I found this article while looking for improving the performance of ASP.NET for one of my application. Its really good one. I am going to try some of the stuff and see if there is a difference in performance. Here;s the link to the blog http://blogs.microsoft.co.il/blogs/rotemb/archive/2008/08/17/performance-tips-for-asp-net-applications.aspx http://blogs.microsoft.co.il/blogs/rotemb/archive/2008/07/29/tune-your-net-application-that-suffer-from-contention-poor-performance-and-deadlocks.aspx]]></description>
			<content:encoded><![CDATA[<p>I found this article while looking for improving the performance of ASP.NET for one of my application.</p>
<p>Its really good one.</p>
<p>I am going to try some of the stuff and see if there is a difference in performance.</p>
<p>Here;s the link to the blog</p>
<p><a href="http://blogs.microsoft.co.il/blogs/rotemb/archive/2008/08/17/performance-tips-for-asp-net-applications.aspx" target="_blank">http://blogs.microsoft.co.il/blogs/rotemb/archive/2008/08/17/performance-tips-for-asp-net-applications.aspx</a></p>
<p><a href="http://blogs.microsoft.co.il/blogs/rotemb/archive/2008/07/29/tune-your-net-application-that-suffer-from-contention-poor-performance-and-deadlocks.aspx" target="_blank">http://blogs.microsoft.co.il/blogs/rotemb/archive/2008/07/29/tune-your-net-application-that-suffer-from-contention-poor-performance-and-deadlocks.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.myhappymoments.com/2008/11/19/performance-tips-for-aspnet-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
