<?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>Learn Dot Net Easily</title>
	<atom:link href="http://learndotneteasily.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://learndotneteasily.wordpress.com</link>
	<description>a blog for all dot net developers</description>
	<lastBuildDate>Wed, 27 Jan 2010 11:58:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='learndotneteasily.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Learn Dot Net Easily</title>
		<link>http://learndotneteasily.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://learndotneteasily.wordpress.com/osd.xml" title="Learn Dot Net Easily" />
	<atom:link rel='hub' href='http://learndotneteasily.wordpress.com/?pushpress=hub'/>
		<item>
		<title>disable right click on textbox using javascript</title>
		<link>http://learndotneteasily.wordpress.com/2010/01/27/disable-right-click-on-textbox-using-javascript/</link>
		<comments>http://learndotneteasily.wordpress.com/2010/01/27/disable-right-click-on-textbox-using-javascript/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 09:59:06 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[disable right click on textbox using javascript]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/?p=46</guid>
		<description><![CDATA[ &#60;script language=&#8221;javascript&#8221; type=&#8221;text/javascript&#8221;&#62;     function disablemouseRightClick(event)  {  //For mouse right click   if (event.button==2) {  alert(&#8220;Right Clicking not allowed!&#8221;); }  }    &#60;/script&#62;    asp:TextBox ID=&#8221;TextBox2&#8243; runat=&#8221;server&#8221; onmousedown=&#8221;disablemouseRightClick(event)&#8221; &#62;&#60;/asp:TextBox&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=46&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div><span style="font-size:x-small;"> <span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">&lt;</span></span><span style="font-size:x-small;color:#800000;"><span style="font-size:x-small;color:#800000;">script</span></span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#ff0000;"><span style="font-size:x-small;color:#ff0000;">language</span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">=&#8221;javascript&#8221;</span></span><span style="font-size:x-small;"> </span><span style="font-size:x-small;color:#ff0000;"><span style="font-size:x-small;color:#ff0000;">type</span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">=&#8221;text/javascript&#8221;&gt;</span></span> </span><span style="font-size:x-small;"> </span></div>
<div><span style="font-size:x-small;"> </span></div>
<div><span style="font-size:x-small;"></span></div>
<p><span style="font-size:x-small;"></p>
<div><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">function </span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;">disablemouseRightClick(</span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">event</span></span><span style="font-size:x-small;">)</span> </span></span></div>
<div><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;">{</span> </span></span></div>
<div><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#008000;"><span style="font-size:x-small;color:#008000;">//For mouse right click </span></span><span style="font-size:x-small;"> </span></span></span></div>
<div><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"></span></span></div>
<p><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"></p>
<div><span style="font-size:x-small;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">if</span></span><span style="font-size:x-small;"> (</span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">event</span></span><span style="font-size:x-small;">.button==2)</span></span></div>
<div><span style="font-size:x-small;"><span style="font-size:x-small;">{</span></span></div>
<div><span style="font-size:x-small;"><span style="font-size:x-small;"> </span></span><span style="font-size:x-small;"><span style="font-size:x-small;"><span style="font-size:x-small;">alert(</span><span style="font-size:x-small;"><span style="font-size:x-small;color:#800000;"><span style="font-size:x-small;color:#800000;">&#8220;Right Clicking not allowed!&#8221;);</span></span></span></span></span></div>
<div><span style="font-size:x-small;"><span style="font-size:x-small;"><span style="font-size:x-small;"><span style="font-size:x-small;color:#800000;"><span style="font-size:x-small;color:#800000;">}</span></span></span><span style="font-size:x-small;"><span style="font-size:x-small;"> </span></span></span><span style="font-size:x-small;"> }</span><span style="font-size:x-small;"><span style="font-size:x-small;"> </span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"> </span></span></span><span style="font-size:x-small;"><span style="font-size:x-small;"> </span></span></div>
<div><span style="font-size:x-small;"><span style="font-size:x-small;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">&lt;/</span></span><span style="font-size:x-small;color:#800000;"><span style="font-size:x-small;color:#800000;">script</span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">&gt;</span></span></span></span></div>
<div><span style="font-size:x-small;"><span style="font-size:x-small;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"> </span></span></span></span></div>
<div><span style="font-size:x-small;"><span style="font-size:x-small;"><span style="font-size:x-small;color:#0000ff;"></span></span></span></div>
<p></span></span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;"> </span></span></span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#800000;"><span style="font-size:x-small;color:#800000;">asp</span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">:</span></span><span style="font-size:x-small;color:#800000;"><span style="font-size:x-small;color:#800000;">TextBox</span></span><span style="font-size:x-small;color:#000000;"> </span><span style="font-size:x-small;color:#ff0000;"><span style="font-size:x-small;color:#ff0000;">ID</span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">=&#8221;TextBox2&#8243;</span></span><span style="font-size:x-small;color:#000000;"> </span><span style="font-size:x-small;color:#ff0000;"><span style="font-size:x-small;color:#ff0000;">runat</span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">=&#8221;server&#8221;</span></span><span style="font-size:x-small;color:#000000;"> </span><span style="font-size:x-small;color:#ff0000;"><span style="font-size:x-small;color:#ff0000;">onmousedown</span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">=&#8221;disablemouseRightClick(event)&#8221;</span></span><span style="font-size:x-small;color:#000000;"> </span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">&gt;&lt;/</span></span><span style="font-size:x-small;color:#800000;"><span style="font-size:x-small;color:#800000;">asp</span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">:</span></span><span style="font-size:x-small;color:#800000;"><span style="font-size:x-small;color:#800000;">TextBox</span></span><span style="font-size:x-small;color:#0000ff;"><span style="font-size:x-small;color:#0000ff;">&gt;</span></span></span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=46&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2010/01/27/disable-right-click-on-textbox-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
		<item>
		<title>disable right click on aspx page</title>
		<link>http://learndotneteasily.wordpress.com/2010/01/27/disable-right-click-on-aspx-page/</link>
		<comments>http://learndotneteasily.wordpress.com/2010/01/27/disable-right-click-on-aspx-page/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 09:32:35 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[disable right click on aspx page]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/?p=42</guid>
		<description><![CDATA[&#60;script language=”javascript” type=”text/javascript“&#62; document.onmousedown=validate; function validate(e) { //for Internet Explore..&#8217;2&#8242; if (event.button == 2) { return false; } //for other browsers like mozila&#8230; if (e.which == 3) { return false; } } &#60;/script&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=42&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&lt;script language=”javascript” type=”text/javascript“&gt;<br />
document.onmousedown=validate;<br />
function validate(e)<br />
{<br />
//for Internet Explore..&#8217;2&#8242;<br />
if (event.button == 2)<br />
{<br />
return false;<br />
}<br />
//for other browsers like mozila&#8230;<br />
if (e.which == 3)<br />
{<br />
return false;<br />
}<br />
}<br />
&lt;/script&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=42&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2010/01/27/disable-right-click-on-aspx-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
		<item>
		<title>disable copy/paste (ctrl + c/v/x) on textbox using javascript in aps.net</title>
		<link>http://learndotneteasily.wordpress.com/2010/01/27/disable-copypaste-ctrl-cvx-on-textbox-using-javascript-in-aps-net/</link>
		<comments>http://learndotneteasily.wordpress.com/2010/01/27/disable-copypaste-ctrl-cvx-on-textbox-using-javascript-in-aps-net/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 09:27:42 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[disable copy in textbox]]></category>
		<category><![CDATA[disable cut in textbox]]></category>
		<category><![CDATA[disable paste in textbox]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/2010/01/27/disable-copypaste-ctrl-cvx-on-textbox-using-javascript-in-aps-net/</guid>
		<description><![CDATA[&#60;asp:TextBox ID=&#8221;TextBox3&#8243; runat=&#8221;server&#8221; oncopy=&#8221;return false&#8221; onpaste=&#8221;return false&#8221; onpaste=&#8221;return false&#8221;&#62;&#60;/asp:TextBox&#62; OR &#60;script language=&#8221;javascript&#8221; type=&#8221;text/javascript&#8221;&#62; function DisableCopyPaste() {            alert(&#8216;This functionality has been disabled !&#8217;); window.clipboardData.clearData(&#8220;Text&#8221;); //for cleaning up the clipboard // Cancel default behavior event.returnValue = false; } &#60;/script&#62; &#60;asp:TextBox ID=&#8221;TextBox1&#8243; runat=&#8221;server&#8221; oncopy=&#8221;DisableCopyPaste()&#8221; onpaste=&#8221;DisableCopyPaste()&#8221;&#62;&#60;/asp:TextBox&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=40&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&lt;asp:TextBox ID=&#8221;TextBox3&#8243; runat=&#8221;server&#8221; oncopy=&#8221;return false&#8221; onpaste=&#8221;return false&#8221; onpaste=&#8221;return false&#8221;&gt;&lt;/asp:TextBox&gt;</p>
<p>OR</p>
<p>&lt;script language=&#8221;javascript&#8221; type=&#8221;text/javascript&#8221;&gt;<br />
function DisableCopyPaste()<br />
{            alert(&#8216;This functionality has been disabled !&#8217;);<br />
window.clipboardData.clearData(&#8220;Text&#8221;); //for cleaning up the clipboard<br />
// Cancel default behavior<br />
event.returnValue = false;</p>
<p>}</p>
<p>&lt;/script&gt;<br />
&lt;asp:TextBox ID=&#8221;TextBox1&#8243; runat=&#8221;server&#8221; oncopy=&#8221;DisableCopyPaste()&#8221; onpaste=&#8221;DisableCopyPaste()&#8221;&gt;&lt;/asp:TextBox&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=40&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2010/01/27/disable-copypaste-ctrl-cvx-on-textbox-using-javascript-in-aps-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
		<item>
		<title>How to get distinct values of a column from datatable</title>
		<link>http://learndotneteasily.wordpress.com/2009/01/23/how-will-get-distinct-values-of-a-column-from-datatable/</link>
		<comments>http://learndotneteasily.wordpress.com/2009/01/23/how-will-get-distinct-values-of-a-column-from-datatable/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 06:00:17 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[distinct column value from datatable]]></category>
		<category><![CDATA[get distinct values of a column from datatable]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/?p=36</guid>
		<description><![CDATA[There are many way to get distinct values of a column from a Datatable 1).         DataTable dt = new DataTable(); dt = dsData.Tables[0].DefaultView.ToTable(true, &#8220;ColumnName&#8221;); 2).      public object[] GetDistinctValues(DataTable dtable, string colName) { Hashtable hTable = new Hashtable(); foreach (DataRow drow in dtable.Rows) if (!hTable.ContainsKey(drow[colName])) hTable.Add(drow[colName], string.Empty); object[] objArray = new object[hTable.Keys.Count]; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=36&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are many way to get distinct values of a column from a Datatable</p>
<p>1).         DataTable dt = new DataTable();<br />
dt = dsData.Tables[0].DefaultView.ToTable(true, &#8220;ColumnName&#8221;);</p>
<p>2).      public object[] GetDistinctValues(DataTable dtable, string colName)<br />
{<br />
Hashtable hTable = new Hashtable();<br />
foreach (DataRow drow in dtable.Rows)<br />
if (!hTable.ContainsKey(drow[colName]))<br />
hTable.Add(drow[colName], string.Empty);<br />
object[] objArray = new object[hTable.Keys.Count];<br />
hTable.Keys.CopyTo(objArray, 0);<br />
return objArray;<br />
}</p>
<p>3).    public DataTable SelectDistinct(string TableName, DataTable SourceTable, string FieldName)<br />
{<br />
DataTable dt = new DataTable(TableName);<br />
dt.Columns.Add(FieldName, SourceTable.Columns[FieldName].DataType);</p>
<p>object LastValue = null;<br />
foreach (DataRow dr in SourceTable.Select(&#8220;&#8221;, FieldName))<br />
{<br />
if (LastValue == null || !(ColumnEqual(LastValue, dr[FieldName])))<br />
{<br />
LastValue = dr[FieldName];<br />
dt.Rows.Add(new object[] { LastValue });<br />
}<br />
}<br />
return dt;<br />
}<br />
private bool ColumnEqual(object A, object B)<br />
{<br />
if (A == DBNull.Value &amp;&amp; B == DBNull.Value)<br />
return true;<br />
if (A == DBNull.Value || B == DBNull.Value)<br />
return false;<br />
return (A.Equals(B));<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=36&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2009/01/23/how-will-get-distinct-values-of-a-column-from-datatable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
		<item>
		<title>New Features in Visual Studio 2010 and the .NET Framework 4.0</title>
		<link>http://learndotneteasily.wordpress.com/2009/01/22/new-features-in-visual-studio-2010-and-the-net-framework-40/</link>
		<comments>http://learndotneteasily.wordpress.com/2009/01/22/new-features-in-visual-studio-2010-and-the-net-framework-40/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 03:55:22 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/?p=30</guid>
		<description><![CDATA[Visual Studio 2008 may be better than sliced bread, but the development team at Microsoft has already been working on the next release. They have recently given us Visual Studio 2010 and the .NET Framework 4.0 as a Community Technology Preview (CTP); it boasts several features that would appeal to developers. New Features in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=30&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span class="bodycopy"><span class="bodycopy">Visual Studio 2008 may be better than sliced bread, but the development team at Microsoft has already been working on the next release. They have recently given us Visual Studio 2010 and the .NET Framework 4.0 as a Community Technology Preview (CTP); it boasts several features that would appeal to developers.</span></span></p>
<p><span class="bodycopy"><span class="bodycopy"></p>
<h4><a name="more">New Features in the Visual Studio 2010 IDE and .NET Framework 4.0</a></h4>
<ul>
<li><a name="more">Call Hierarchy of methods</a></li>
<li><a name="more">A New Quick Search</a></li>
<li><a name="more">Multi-targeting more accurate</a></li>
<li><a name="more">Parallel Programming and Debugging</a></li>
<li><a name="more">XSLT Profiling and Debugging</a></li>
<li><a name="more">The XSD Designer</a></li>
</ul>
<h4><a name="more">New ASP.NET features</a></h4>
<ul>
<li><a name="more">Static IDs for ASP.NET Controls</a></li>
<li><a name="more">The Chart control</a></li>
<li><a name="more">Web.config transformation</a></li>
</ul>
<h4><a name="more">New VB.NET features</a></h4>
<ul>
<li><a name="more">Auto Implemented Properties for VB.NET</a></li>
<li><a name="more">Collection Initializers</a></li>
<li><a name="more">Implicit Line Continuations</a></li>
<li><a name="more">Statements in Lambda Expressions</a></li>
</ul>
<h4><a name="more">New C# features</a></h4>
<ul>
<li><a name="more">Dynamic Types</a></li>
<li><a name="more">Optional parameters</a></li>
<li><a name="more">Named and Optional Arguments</a></li>
</ul>
<p></span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=30&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2009/01/22/new-features-in-visual-studio-2010-and-the-net-framework-40/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
		<item>
		<title>Client Side Validation with JavaScript in ASP.NET</title>
		<link>http://learndotneteasily.wordpress.com/2009/01/22/client-side-validation-with-javascript-in-aspnet/</link>
		<comments>http://learndotneteasily.wordpress.com/2009/01/22/client-side-validation-with-javascript-in-aspnet/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 03:42:20 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/?p=27</guid>
		<description><![CDATA[This simple program will guide how to do client side validation of Form in JavaScript. In this just make a form as follows: Name : &#60;asp:TextBox ID=&#8221;txtName&#8221; /&#62; Email : &#60;asp:TextBox ID=&#8221;txtEmail&#8221; /&#62; Web URL : &#60;asp:TextBox ID=&#8221;txtWebUrl&#8221; /&#62; Zip : &#60;asp:TextBox ID=&#8221;txtZip&#8221; /&#62; &#60;asp:Button ID=&#8221;btnSubmit&#8221; OnClientClick=&#8221; return validate()&#8221; runat=&#8221;server&#8221; Text=&#8221;Submit&#8221; /&#62; Now on the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=27&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This simple program will guide how to do client side validation of Form in JavaScript.</span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">In this just make a form as follows:</span></span></p>
<ol><span style="font-size:x-small;">
</p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Name : <span style="color:rgb(0,0,255);font-size:x-small;">&lt;</span><span style="color:rgb(128,0,0);font-size:x-small;">asp</span><span style="color:rgb(0,0,255);font-size:x-small;">:</span><span style="color:rgb(128,0,0);font-size:x-small;">TextBox</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">ID</span><span style="color:rgb(0,0,255);font-size:x-small;">=&#8221;txtName&#8221;</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">/&gt;</span></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Email : <span style="color:rgb(0,0,255);font-size:x-small;">&lt;</span><span style="color:rgb(128,0,0);font-size:x-small;">asp</span><span style="color:rgb(0,0,255);font-size:x-small;">:</span><span style="color:rgb(128,0,0);font-size:x-small;">TextBox</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">ID</span><span style="color:rgb(0,0,255);font-size:x-small;">=&#8221;txtEmail&#8221;</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">/&gt;</span></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Web URL : <span style="color:rgb(0,0,255);font-size:x-small;">&lt;</span><span style="color:rgb(128,0,0);font-size:x-small;">asp</span><span style="color:rgb(0,0,255);font-size:x-small;">:</span><span style="color:rgb(128,0,0);font-size:x-small;">TextBox</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">ID</span><span style="color:rgb(0,0,255);font-size:x-small;">=&#8221;txtWebUrl&#8221;</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">/&gt;</span></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Zip : <span style="color:rgb(0,0,255);font-size:x-small;">&lt;</span><span style="color:rgb(128,0,0);font-size:x-small;">asp</span><span style="color:rgb(0,0,255);font-size:x-small;">:</span><span style="color:rgb(128,0,0);font-size:x-small;">TextBox</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">ID</span><span style="color:rgb(0,0,255);font-size:x-small;">=&#8221;txtZip&#8221;</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">/&gt;</span></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:rgb(0,0,255);font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">&lt;</span><span style="color:rgb(128,0,0);font-size:x-small;">asp</span><span style="color:rgb(0,0,255);font-size:x-small;">:</span><span style="color:rgb(128,0,0);font-size:x-small;">Button</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">ID</span><span style="color:rgb(0,0,255);font-size:x-small;">=&#8221;btnSubmit&#8221;</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">OnClientClick</span><span style="color:rgb(0,0,255);font-size:x-small;">=&#8221; return validate()&#8221;</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">runat</span><span style="color:rgb(0,0,255);font-size:x-small;">=&#8221;server&#8221;</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">Text</span><span style="color:rgb(0,0,255);font-size:x-small;">=&#8221;Submit&#8221;</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">/&gt;</span>
</p>
<p></span></li>
</p>
<p></span></ol>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Now on the source code of this form in script tag write the following code:</span></span></p>
<p><span style="font-size:x-small;"><span style="color:rgb(0,0,255);font-size:x-small;"> </span></span></p>
<p><span style="font-size:x-small;"><span style="color:rgb(0,0,255);font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">&lt;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:rgb(128,0,0);font-size:x-small;">script</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">language</span><span style="color:rgb(0,0,255);font-size:x-small;">=&#8221;javascript&#8221;</span><span style="font-size:x-small;"> </span><span style="color:rgb(255,0,0);font-size:x-small;">type</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:rgb(0,0,255);font-size:x-small;">=&#8221;text/javascript&#8221;&gt;<br />
function</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> validate()<br />
{<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> if</span><span style="font-size:x-small;"> (document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtName.ClientID%&gt;&#8221;</span><span style="font-size:x-small;">).value==</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">)<br />
{<br />
</span><span style="font-size:x-small;"> alert(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;Name Feild can not be blank&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">);<br />
document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtName.ClientID%&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).focus();<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> return</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">false</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;<br />
}<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> if</span><span style="font-size:x-small;">(document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtEmail.ClientID %&gt;&#8221;</span><span style="font-size:x-small;">).value==</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">)<br />
{<br />
alert(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;Email id can not be blank&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">);<br />
</span><span style="font-size:x-small;"> document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtEmail.ClientID %&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).focus();<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> return</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">false</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;<br />
}<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> var</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> emailPat = /^(\&#8221;.*\&#8221;|[A-Za-z]\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> var</span><span style="font-size:x-small;"> emailid=document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtEmail.ClientID %&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).value;<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> var</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> matchArray = emailid.match(emailPat);<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> if</span><span style="font-size:x-small;"> (matchArray == </span><span style="color:rgb(0,0,255);font-size:x-small;">null</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">)<br />
{<br />
alert(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;Your email address seems incorrect. Please try again.&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">);<br />
document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtEmail.ClientID %&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).focus();<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> return</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">false</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;<br />
}<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> if</span><span style="font-size:x-small;">(document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtWebURL.ClientID %&gt;&#8221;</span><span style="font-size:x-small;">).value==</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">)<br />
{<br />
alert(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;Web URL can not be blank&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">);<br />
document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtWebURL.ClientID %&gt;&#8221;</span><span style="font-size:x-small;">).value=</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;http://&#8221;<br />
</span><span style="font-size:x-small;"> document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtWebURL.ClientID %&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).focus();<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> return</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">false</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;<br />
}<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> var</span><span style="font-size:x-small;"> Url=</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&amp;\?\/.=]+$&#8221;<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> var</span><span style="font-size:x-small;"> tempURL=document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtWebURL.ClientID%&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).value;<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> var</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> matchURL=tempURL.match(Url);<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> if</span><span style="font-size:x-small;">(matchURL==</span><span style="color:rgb(0,0,255);font-size:x-small;">null</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">)<br />
{<br />
alert(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;Web URL does not look valid&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">);<br />
document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtWebURL.ClientID %&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).focus();<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> return</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">false</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;<br />
}<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> if</span><span style="font-size:x-small;"> (document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtZIP.ClientID%&gt;&#8221;</span><span style="font-size:x-small;">).value==</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">)<br />
{<br />
alert(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;Zip Code is not valid&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">);<br />
document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtZIP.ClientID%&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).focus();<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> return</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">false</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;<br />
}<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> var</span><span style="font-size:x-small;"> digits=</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;0123456789&#8243;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> var</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> temp;<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> for</span><span style="font-size:x-small;"> (</span><span style="color:rgb(0,0,255);font-size:x-small;">var</span><span style="font-size:x-small;"> i=0;i&lt;document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtZIP.ClientID %&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).value.length;i++)<br />
{<br />
temp=document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtZIP.ClientID%&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).value.substring(i,i+1);<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> if</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> (digits.indexOf(temp)==-1)<br />
{<br />
alert(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;Please enter correct zip code&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">);<br />
document.getElementById(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;&lt;%=txtZIP.ClientID%&gt;&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">).focus();<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> return</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">false</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;<br />
}<br />
}<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;"> return</span><span style="font-size:x-small;"> </span><span style="color:rgb(0,0,255);font-size:x-small;">true</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;<br />
}<br />
</span><span style="color:rgb(0,0,255);font-size:x-small;">&lt;/</span><span style="color:rgb(128,0,0);font-size:x-small;">script</span><span style="color:rgb(0,0,255);font-size:x-small;">&gt;</span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:rgb(0,0,255);font-size:x-small;">In code behind Page_Load write this code</span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">btnSubmit.Attributes.Add(</span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;onclick&#8221;</span><span style="font-size:x-small;">, </span><span style="color:rgb(128,0,0);font-size:x-small;">&#8220;return validate()&#8221;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">)</span></span></span></p>
<p>Hope this will help you.</p>
<p>Regards</p>
<p>$unil Dhiman<span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"><br />
</span></span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=27&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2009/01/22/client-side-validation-with-javascript-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
		<item>
		<title>Convert DataSet and DataTable to Xml String</title>
		<link>http://learndotneteasily.wordpress.com/2009/01/22/convert-dataset-and-datatable-to-xml-string/</link>
		<comments>http://learndotneteasily.wordpress.com/2009/01/22/convert-dataset-and-datatable-to-xml-string/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 03:32:20 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[DataSet to Xml String]]></category>
		<category><![CDATA[DataTable to Xml String]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/2009/01/22/convert-dataset-and-datatable-to-xml-string/</guid>
		<description><![CDATA[public static string ToStringAsXml(DataSet ds) { StringWriter sw = new StringWriter(); ds.WriteXml(sw, XmlWriteMode.IgnoreSchema); string s = sw.ToString(); return s; }   public static string ToStringAsXml(DataTable dt) { StringWriter sw = new StringWriter(); dt.WriteXml(sw, XmlWriteMode.IgnoreSchema); string s = sw.ToString(); return s; }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=25&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="u6nc"><span style="color:#0000ff;font-size:x-small;">public</span> <span style="color:#0000ff;font-size:x-small;">static</span> <span style="color:#0000ff;font-size:x-small;">string</span><span style="font-size:x-small;"> ToStringAsXml(</span><span style="color:#2b91af;font-size:x-small;">DataSet</span><span style="font-size:x-small;"> ds)</span></div>
<p>{</p>
<p><span style="color:#2b91af;font-size:x-small;">StringWriter</span><span style="font-size:x-small;"> sw = </span><span style="color:#0000ff;font-size:x-small;">new</span> <span style="color:#2b91af;font-size:x-small;">StringWriter</span><span style="font-size:x-small;">();<br />
</span><span style="font-size:x-small;">ds.WriteXml(sw, </span><span style="color:#2b91af;font-size:x-small;">XmlWriteMode</span><span style="font-size:x-small;">.IgnoreSchema);</span></p>
<p><span style="color:#0000ff;font-size:x-small;">string</span><span style="font-size:x-small;"> s = sw.ToString();</span></p>
<p><span style="color:#0000ff;font-size:x-small;">return</span><span style="font-size:x-small;"> s;</span></p>
<div id="cx6.6">}</div>
<p><span style="font-size:x-small;"> </span></p>
<div id="cx6.8">
<p style="margin-right:0;" dir="ltr"><span style="color:#0000ff;font-size:x-small;">public</span> <span style="color:#0000ff;font-size:x-small;">static</span> <span style="color:#0000ff;font-size:x-small;">string</span><span style="font-size:x-small;"> ToStringAsXml(</span><span style="color:#2b91af;font-size:x-small;">DataTable</span><span style="font-size:x-small;"> dt)<br />
</span><span style="font-size:x-small;">{<br />
<span style="color:#2b91af;font-size:x-small;">StringWriter</span><span style="font-size:x-small;"> sw = </span><span style="color:#0000ff;font-size:x-small;">new</span> <span style="color:#2b91af;font-size:x-small;">StringWriter</span><span style="font-size:x-small;">();<br />
</span><span style="font-size:x-small;">dt.WriteXml(sw, </span><span style="color:#2b91af;font-size:x-small;">XmlWriteMode</span><span style="font-size:x-small;">.IgnoreSchema);<br />
</span><span style="color:#0000ff;font-size:x-small;">string</span><span style="font-size:x-small;"> s = sw.ToString();<br />
</span><span style="color:#0000ff;font-size:x-small;">return</span><span style="font-size:x-small;"> s;</span></span></p>
<p>}</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=25&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2009/01/22/convert-dataset-and-datatable-to-xml-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
		<item>
		<title>Constructors in C#</title>
		<link>http://learndotneteasily.wordpress.com/2008/06/03/constructors-in-c/</link>
		<comments>http://learndotneteasily.wordpress.com/2008/06/03/constructors-in-c/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 09:01:11 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Constructors in C#]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/?p=17</guid>
		<description><![CDATA[Introduction Broadly speaking, a constructor is a method in the class which gets executed when its object is created. Usually, we put the initialization code in the constructor. Writing a constructor in the class is damn simple, have a look at the following sample: public class mySampleClass { public mySampleClass() { // This is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=17&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Broadly speaking, a constructor is a method in the class which gets executed when its object is created. Usually, we put the initialization code in the constructor. Writing a constructor in the class is damn simple, have a look at the following sample:</p>
<pre><span lang="CS">public class mySampleClass</span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span>public mySampleClass()</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// This is the constructor method.</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// rest of the class members goes here.</span></span>
<span lang="CS">}</span></pre>
<p>When the object of this class is instantiated, this constructor will be executed. Something like this:</p>
<pre><span lang="CS">mySampleClass obj = new mySampleClass()</span>
<span class="cs-comment1"><span lang="CS">// At this time the code in the constructor will // be executed</span></span></pre>
<h2>Constructor Overloading</h2>
<p>C# supports overloading of constructors, that means, we can have constructors with different sets of parameters. So, our class can be like this:</p>
<pre><span lang="CS">public class mySampleClass</span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span>public mySampleClass()</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// This is the no parameter constructor method.</span></span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// First Constructor</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span>public mySampleClass(int Age)</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// This is the constructor with one parameter.</span></span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Second Constructor</span></span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span>public mySampleClass(int Age, string Name)</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// This is the constructor with two parameters.</span></span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Third Constructor</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// rest of the class members goes here.</span></span>
<span lang="CS">}</span></pre>
<p>Well, note here that call to the constructor now depends on the way you instantiate the object. For example:</p>
<pre><span lang="CS">mySampleClass obj = new mySampleClass()</span>
<span class="cs-comment1"><span lang="CS">// At this time the code of no parameter<span>  </span></span></span>
<span class="cs-comment1"><span lang="CS">// constructor (First Constructor)will be executed</span></span>
<span lang="CS"> </span>
<span lang="CS">mySampleClass obj = new mySampleClass(12)</span>
<span class="cs-comment1"><span lang="CS">// At this time the code of one parameter<span>  </span></span></span>
<span class="cs-comment1"><span lang="CS">// constructor(Second Constructor)will be </span></span>
<span class="cs-comment1"><span lang="CS">// executed.</span></span></pre>
<p>The call to the constructors is completely governed by the rules of overloading here.</p>
<h2>Calling Constructor from another Constructor</h2>
<p>You can always make a call to one constructor from within another. Say, for example:</p>
<pre><span lang="CS">public class mySampleClass</span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span>public mySampleClass(): this(10)</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// This is the no parameter constructor method.</span></span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// First Constructor</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span>public mySampleClass(int Age) </span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// This is the constructor with one parameter.</span></span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Second Constructor</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS">}</span></pre>
<p>Very first of all, let us see what is this syntax:</p>
<pre><span lang="CS">public mySampleClass(): this(10)</span></pre>
<p>Here, <span class="cs-keyword1"><span>this</span></span> refers to same class, so when we say <code><span lang="CS">this(10)</span></code>, we actually mean execute the <code><span lang="CS">public mySampleClass(int Age)</span></code> method. The above way of calling the method is called initializer. We can have at the most one initializer in this way in the method.</p>
<p>Another thing which we must know is the execution sequence i.e., which method will be executed when. Here, if I instantiate the object as:</p>
<pre><span lang="CS">mySampleClass obj = new mySampleClass()</span></pre>
<p>Then the code of <code><span lang="CS">public mySampleClass(int Age)</span></code> will be executed before the code of <code>mySampleClass()</code>. So, practically the definition of the method:</p>
<pre><span lang="CS">public mySampleClass(): this(10)</span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// This is the no parameter constructor method.</span></span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// First Constructor</span></span>
<span lang="CS">}</span></pre>
<p>is equivalent to:</p>
<pre><span lang="CS">public mySampleClass()</span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span>mySampleClass(10) </span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// This is the no parameter constructor method.</span></span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// First Constructor</span></span>
<span lang="CS">}</span></pre>
<p><strong><span style="font-family:Verdana;">Note</span></strong>: Above (just above this line) code is mentioned there for pure analogy and will not compile. The intention here is to tell the flow of execution if initializers are used.</p>
<p>We cannot make an explicit call to the constructors in C#, treating them as if any simple method, for example: statement <code>mySampleClass(10)</code> in the above code will not work. The only way you can call one constructor from another is through initializers.</p>
<p>For the VB.NET programmers: you can make the call to another constructor of the same class by the syntax <code>Me.New(param list)</code>, but it should be the first line of your calling constructor method. So ultimately, the code of the called constructor runs prior to the code of the calling constructor, which is same as initializers here.</p>
<p>Note that only <span class="cs-keyword1"><span>this</span></span> and <span class="cs-keyword1"><span>base</span></span> (we will see it further) keywords are allowed in initializers, other method calls will raise an error.</p>
<p>This is sometimes called Constructor chaining.</p>
<p>Huff… Simple thing made tough, but this is how it is. Anyway, let us proceed further.</p>
<h2>Behavior of Constructors in Inheritance</h2>
<p>Let us first create the inherited class.</p>
<pre><span lang="CS">public class myBaseClass</span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span>public myBaseClass()</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Code for First Base class Constructor</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span>public myBaseClass(int Age)</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Code for Second Base class Constructor</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// Other class members goes here</span></span>
<span lang="CS">}</span>
<span lang="CS"> </span>
<span lang="CS">public class myDerivedClass : myBaseClass</span>
<span class="cs-comment1"><span lang="CS">// Note that I am inheriting the class here.</span></span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span>public myDerivedClass()</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>   </span><span>     </span></span><span class="cs-comment1"><span lang="CS">// Code for the First myDerivedClass Constructor.</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span>public myDerivedClass(int Age):base(Age)</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Code for the Second myDerivedClass Constructor.</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// Other class members goes here</span></span>
<span lang="CS">}</span></pre>
<p>Now, what will be the execution sequence here:</p>
<p>If I create the object of the derived class as:</p>
<pre><span lang="CS">myDerivedClass obj = new myDerivedClass()</span></pre>
<p>Then the sequence of execution will be:</p>
<ol type="1">
<li class="MsoNormal"><code><span style="font-size:10pt;" lang="CS">public myBaseClass()</span></code><span style="font-size:10pt;font-family:Verdana;"> method. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">and then </span><code><span style="font-size:10pt;" lang="CS">public myDerivedClass()</span></code><span style="font-size:10pt;font-family:Verdana;"> method. </span></li>
</ol>
<p>Note: If we do not provide initializer referring to the base class constructor then it executes the no parameter constructor of the base class.</p>
<p>Note one thing here: we are not making any explicit call to the constructor of base class neither by initializer nor by the <span class="cs-keyword1"><span>base</span></span> keyword, but it is still executing. This is the normal behavior of the constructor.</p>
<p>If I create an object of the derived class as:</p>
<pre><span lang="CS">myDerivedClass obj = new myDerivedClass(15)</span></pre>
<p>Then the sequence of execution will be:</p>
<ol type="1">
<li class="MsoNormal"><code><span style="font-size:10pt;" lang="CS">public myBaseClass(int Age)</span></code><span style="font-size:10pt;font-family:Verdana;"> method </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">and then </span><code><span style="font-size:10pt;" lang="CS">public myDerivedClass(int Age)</span></code><span style="font-size:10pt;font-family:Verdana;"> method </span></li>
</ol>
<p>Here, the new keyword <span class="cs-keyword1"><span>base</span></span> has come into picture. This refers to the base class of the current class. So, here it refers to the <code>myBaseClass</code>. And <code><span lang="CS">base(10)</span></code> refers to the call to <code><span lang="CS">myBaseClass(int Age)</span></code> method.</p>
<p>Also note the usage of <code>Age</code> variable in the syntax: <code><span lang="CS">public myDerivedClass(int Age):base(Age)</span></code>. [Understanding it is left to the reader].</p>
<h2>Private Constructors</h2>
<p>Private constructors, the constructors with the &#8220;<span class="cs-keyword1"><span>private</span></span>&#8221; access modifier, are a bit special case. It is because we can neither create the object of the class, nor can we inherit the class with only <span class="cs-keyword1"><span>private</span></span> constructors. But yes, we can have the set of <span class="cs-keyword1"><span>public</span></span> constructors along with the <span class="cs-keyword1"><span>private</span></span> constructors in the class and the <span class="cs-keyword1"><span>public</span></span> constructors can access the <span class="cs-keyword1"><span>private</span></span> constructors from within the class through constructor chaining.</p>
<p>Say for example, my class is something like this :</p>
<pre><span lang="CS">public class myClass</span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span>private MyClass()</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span>Console.WriteLine(</span><span class="cpp-string1"><span lang="CS">"This is no parameter Constructor"</span></span><span lang="CS">);</span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span>public MyClass(int var):this()</span>
<span lang="CS"><span>   </span><span> </span>{</span>
<span lang="CS"><span>        </span>Console.WriteLine(</span><span class="cpp-string1"><span lang="CS">"This is one parameter Constructor"</span></span><span lang="CS">);</span>
<span lang="CS"><span>    </span>}<span>    </span></span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// Other class methods goes here</span></span>
<span lang="CS">}</span></pre>
<p>Then we can create the object of this class by the statement:</p>
<pre><span lang="CS">MyClass obj = new MyClass(10);</span></pre>
<p>The above statement will work fine, but the statement</p>
<pre><span lang="CS">MyClass obj = new MyClass();</span></pre>
<p>will raise an error : <em><span>&#8216;Constructors.MyClass.MyClass()&#8217; is inaccessible due to its protection level</span></em></p>
<p>It is possible to have the class with only the private constructors. But yes as I said, such class can neither be instantiated nor be inherited. If we try to inherit the class with only private constructors then we will get the same error as above. Also recall, once you provide constructor from your side the compiler will not add the no-parameter public constructor to your class.</p>
<p>Well, one of the usage scenarios of such class could be – when you have only static members in the class and you don&#8217;t need to instantiate it.</p>
<p>Phew… lost… Anything left in constructors? Yes, Static Constructors. Ha!! Now, what are they? Let us see..</p>
<h2>Static Constructors</h2>
<p>This is a new concept introduced in C#. By new here, I mean that it was not available for the C++ developers. This is a special constructor and gets called before the first object is created of the class. The time of execution cannot be determined, but it is definitely before the first object creation &#8211; could be at the time of loading the assembly.</p>
<p>The syntax of writing the static constructors is also damn simple. Here it is:</p>
<pre><span lang="CS">public class myClass</span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span>static myClass()</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Initialization code goes here.</span></span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Can only access static members here.</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// Other class methods goes here</span></span>
<span lang="CS">}</span></pre>
<p>Notes for Static Constructors:</p>
<ol type="1">
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">There can be only one static constructor in the      class. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">The static constructor should be without parameters. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">It can only access the static members of the class. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">There should be no access modifier in static      constructor definition. </span></li>
</ol>
<p>Ok fine, all the above points are fine, but why is it like that? Let us go step by step here.</p>
<p>Firstly, the call to the static method is made by the CLR and not by the object, so we do not need to have the access modifier to it.</p>
<p>Secondly, it is going to be called by CLR, who can pass the parameters to it, if required. So we cannot have parameterized static constructor.</p>
<p>Thirdly, non-static members in the class are specific to the object instance. So static constructor, if allowed to work on non-static members, will reflect the changes in all the object instances, which is impractical. So static constructor can access only static members of the class.</p>
<p>Fourthly, overloading needs the two methods to be different in terms of methods definition, which you cannot do with Static Constructors, so you can have at the most one static constructor in the class.</p>
<p>Now, one question raises here, can we have two constructors as:</p>
<pre><span lang="CS">public class myClass</span>
<span lang="CS">{</span>
<span lang="CS"><span>    </span>static myClass()</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Initialization code goes here.</span></span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Can only access static members here.</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"><span>    </span>public myClass()</span>
<span lang="CS"><span>    </span>{</span>
<span lang="CS"><span>        </span></span><span class="cs-comment1"><span lang="CS">// Code for the First myDerivedClass Constructor.</span></span>
<span lang="CS"><span>    </span>}</span>
<span lang="CS"> </span>
<span lang="CS"><span>    </span></span><span class="cs-comment1"><span lang="CS">// Other class methods goes here</span></span>
<span lang="CS">}</span></pre>
<p>This is perfectly valid, though doesn&#8217;t seem to be in accordance with overloading concepts. But why? Because the time of execution of the two methods are different. One is at the time of loading the assembly and one is at the time of object creation.</p>
<h2>Constructors FAQs</h2>
<ol type="1">
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">Is the constructor mandatory for a class? </span></li>
</ol>
<p style="margin-left:0.5in;">Yes, it is mandatory to have the constructor in the class and that too should be accessible for the object i.e., it should have a proper access modifier. Say, for example, we have only private constructor(s) in the class and if we are interested in instantiating the class, i.e., want to create an object of the class, then having only private constructor will not be sufficient and in fact it will raise an error. So, proper access modifies should be provided to the constructors.</p>
<ol type="1">
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">What if I do not write the constructor? </span></li>
</ol>
<p style="margin-left:0.5in;">In such case, the compiler will try to supply the no parameter constructor for your class, behind the scene. Compiler will attempt this only if you do not write the constructor for the class. If you provide any constructor (with or without parameters), then compiler will not make any such attempt.</p>
<ol type="1">
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">What if I have the constructor </span><code><span style="font-size:10pt;" lang="CS">public      myDerivedClass()</span></code><span style="font-size:10pt;font-family:Verdana;">, but not the </span><code><span style="font-size:10pt;" lang="CS">public myBaseClass()</span></code><span style="font-size:10pt;font-family:Verdana;">? </span></li>
</ol>
<p style="margin-left:0.5in;">It will raise an error. If either the no parameter constructor is absent or it is in-accessible (say it is <span class="cs-keyword1"><span>private</span></span>), it will raise an error. You will have to take the precaution here.</p>
<ol type="1">
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">Can we access static members from the non-static      (normal) constructors? </span></li>
</ol>
<p style="margin-left:0.5in;">Yes, we can. There is no such restriction on non-static constructors. But there is one on static constructors that it can access only static members.</p>
<p class="MsoNormal"><strong><span style="font-size:10pt;font-family:Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong><span style="font-size:10pt;font-family:Verdana;">Default Constructor:</span></strong></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Verdana;">I have to disagree. Unless C# definition is different from C++, default constructor means constructor without parameters.</span></p>
<p>default constructor is a constructor without any arguments or one with arguments where default values were supplied, which effectively is the same if the user does not pass a parameter on it. What you are talking about is called &#8220;implicit default constructor,&#8221;<br />
where the language provides the constructor IFF you don&#8217;t declare any.<br />
REFERENCES:</p>
<p>http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Companion/cxx_crib/constructors.html</p>
<p>look for sentence<br />
&#8220;C++ requires that all classes have a default constructor, that is to say a constructor that can be used without arguments.&#8221;<br />
or</p>
<p>http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.4</p>
<p>Why &#8220;implicit&#8221; ? &#8211; because it only works when you don&#8217;t declare any constructors yourself and it creates one (without parameters) for you.</p>
<p>1st. example shows default constructor, 2nd. shows implicit default constructor. Try removing the default constructor from 1st example and watch what happens.<br />
using System;<br />
using System.IO;<br />
<code><span style="font-size:10pt;">//1st.</span></code><span style="font-size:10pt;"><br />
<code>class Car</code><br />
<code>{</code><br />
<code>string x;</code><br />
<code>public static void Main(string[] args)</code><br />
<code>{</code></span></p>
<p><code>Car mycar = new Car();</code><br />
<code>Car mycar2 = new Car("Ferrari");</code></p>
<p><code>}</code></p>
<p><code>public Car()</code><br />
<code>{</code><br />
<code>x = "Toyota"; //default constructor</code><br />
<code>} </code><br />
<code>public Car(string name) //constructor with 1 arg</code><br />
<code>{</code><br />
<code>x = name;</code><br />
<code>}</code></p>
<p><code>}</code><br />
<code>//2nd.</code><br />
<code>using System;</code><br />
<code>using System.IO;</code></p>
<p><code>class Car</code><br />
<code>{</code><br />
<code>string x;</code><br />
<code>public static void </code><code><span style="font-size:10pt;">Main</span></code><code><span style="font-size:10pt;">(string[] args)</span></code><span style="font-size:10pt;"><br />
<code>{</code></span></p>
<p><code>Car mycar = new Car(); //implicit default constructor</code><br />
<code>}</code><br />
<code>}</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/learndotneteasily.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/learndotneteasily.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=17&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2008/06/03/constructors-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
		<item>
		<title>find second highest salary</title>
		<link>http://learndotneteasily.wordpress.com/2008/06/03/find-second-highest-salary/</link>
		<comments>http://learndotneteasily.wordpress.com/2008/06/03/find-second-highest-salary/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 08:54:18 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[second highest salary]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/?p=16</guid>
		<description><![CDATA[select e1.* from emp e1 where 2 = (select count(e2.salary) from emp e2 where e2.salary&#62;=e1.salary)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=16&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>select e1.* from emp e1 where 2 = (select count(e2.salary) from emp e2 where e2.salary&gt;=e1.salary)</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/learndotneteasily.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/learndotneteasily.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=16&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2008/06/03/find-second-highest-salary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
		<item>
		<title>count for the number of occurances for \n</title>
		<link>http://learndotneteasily.wordpress.com/2008/06/03/count-for-the-number-of-occurances-for-n/</link>
		<comments>http://learndotneteasily.wordpress.com/2008/06/03/count-for-the-number-of-occurances-for-n/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 08:19:22 +0000</pubDate>
		<dc:creator>$unil Dhiman</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[count for the number of occurances for \n]]></category>

		<guid isPermaLink="false">http://learndotneteasily.wordpress.com/?p=11</guid>
		<description><![CDATA[you can count for the number of occurances for \n function countRows() { var rows = document.getElementById(&#8220;test&#8221;).value.split(&#8216;\n&#8217;);; alert(rows.length); } this will give the number of lines &#60;textarea id=&#8221;ata&#8221; runat=&#8221;server&#8221; cols=&#8221;20&#8243; rows=&#8221;2&#8243;&#62;&#60;/textarea&#62; &#60;input type=&#8221;button&#8221; value=&#8221;Count lines&#8221; önclick=&#8221;alert(escape(ata.value).split(&#8216;%0A&#8217;).length);&#8221; /&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=11&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>you can count for the number of occurances for \n</p>
<p>function countRows()<br />
{<br />
var rows = document.getElementById(&#8220;test&#8221;).value.split(&#8216;\n&#8217;);;<br />
alert(rows.length);<br />
}</p>
<p>this will give the number of lines</p>
<p>&lt;textarea id=&#8221;ata&#8221; runat=&#8221;server&#8221; cols=&#8221;20&#8243; rows=&#8221;2&#8243;&gt;&lt;/textarea&gt;<br />
&lt;input type=&#8221;button&#8221; value=&#8221;Count lines&#8221; önclick=&#8221;alert(escape(ata.value).split(&#8216;%0A&#8217;).length);&#8221; /&gt;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/learndotneteasily.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/learndotneteasily.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/learndotneteasily.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/learndotneteasily.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/learndotneteasily.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/learndotneteasily.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/learndotneteasily.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/learndotneteasily.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/learndotneteasily.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/learndotneteasily.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/learndotneteasily.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/learndotneteasily.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/learndotneteasily.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/learndotneteasily.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/learndotneteasily.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/learndotneteasily.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learndotneteasily.wordpress.com&amp;blog=3834960&amp;post=11&amp;subd=learndotneteasily&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learndotneteasily.wordpress.com/2008/06/03/count-for-the-number-of-occurances-for-n/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92d642e31accca9716094bd9f23975be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">$unil Dhiman</media:title>
		</media:content>
	</item>
	</channel>
</rss>
