<?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>Jibran's Blog (www.2stepssolutions.com)</title>
	<atom:link href="http://jibrankhan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jibrankhan.wordpress.com</link>
	<description>Its all about software development and related technologies.</description>
	<lastBuildDate>Sat, 29 Nov 2008 15:45:59 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='jibrankhan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/420108b0bb251c093a4d66251f929d32?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Jibran's Blog (www.2stepssolutions.com)</title>
		<link>http://jibrankhan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jibrankhan.wordpress.com/osd.xml" title="Jibran&#8217;s Blog (www.2stepssolutions.com)" />
		<item>
		<title>Roundedcornersextender padding and margin problem</title>
		<link>http://jibrankhan.wordpress.com/2008/11/06/roundedcornersextender-padding-and-margin-problem/</link>
		<comments>http://jibrankhan.wordpress.com/2008/11/06/roundedcornersextender-padding-and-margin-problem/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 12:29:34 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[Extenders]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET Ajax]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=55</guid>
		<description><![CDATA[Well, using RoundCornerExtender became a headache for me when i had to use it all over the page on different sections using a Panel (Div). Each Panel had to have padding to keep a distance between the content and the border of the Panel and margin to keep reasonable distance between two Panels.
Anyway, giving padding or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=55&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Well, using RoundCornerExtender became a headache for me when i had to use it all over the page on different sections using a Panel (Div). Each Panel had to have padding to keep a distance between the content and the border of the Panel and margin to keep reasonable distance between two Panels.</p>
<p>Anyway, giving padding or margin really ruined the idea and the entire Panel was distorted. I am not sure if there is a quicker method to fix it but there is a work around and that is buy using 3 Panels.</p>
<p>There should be one outer panel and two panels inside that outer one. Give <strong>margin</strong> to the most outer Panel and <strong>padding</strong> to the inner most Panel. but here is the catch, <strong>Roundedcornersextender </strong>has to be associated with the middle Panel and give middle panel 0 padding and 0 margin so that it doesn&#8217;t inherit any styling from its parent panel (margin).</p>
<p>Outer and inner most Panels can be replaced with the client side div (easy to handle with javascript due to static Ids)</p>
<p>Its a small workaround, i hope it helps <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>HTML:</strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:'Courier New';">&lt;</span><span style="font-size:10pt;color:#a31515;font-family:'Courier New';">div</span><span style="font-size:10pt;font-family:'Courier New';"> <span style="color:red;">id</span><span style="color:blue;">=&#8221;divOuter&#8221;</span> <span style="color:red;">class</span><span style="color:blue;">=&#8221;round_outer_panel&#8221;&gt;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>      </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>  </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Panel</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;divRound&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">CssClass</span><span style="color:blue;">=&#8221;round_middle_panel&#8221;&gt;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">div</span> <span style="color:red;">id</span><span style="color:blue;">=&#8221;divContent&#8221;</span> <span style="color:red;">class</span><span style="color:blue;">=&#8221;round_inner_panel&#8221;&gt;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>                </span>content goes here..</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>  </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Panel</span><span style="color:blue;">&gt;</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>  </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">cc1</span><span style="color:blue;">:</span><span style="color:#a31515;">RoundedCornersExtender</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;RoundedCornersExtender2&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">Radius</span><span style="color:blue;">=&#8221;4&#8243; </span><span style="color:red;">TargetControlID</span><span style="color:blue;">=&#8221;divRound&#8221;&gt;&lt;/</span><span style="color:#a31515;">cc1</span><span style="color:blue;">:</span><span style="color:#a31515;">RoundedCornersExtender</span><span style="color:blue;">&gt;</span></span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><br />
&lt;/</span><span style="font-size:10pt;color:#a31515;line-height:115%;font-family:'Courier New';">div</span><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';">&gt;</span></p>
<p><strong>CSS:</strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#a31515;font-family:'Courier New';">.round_outer_panel</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';">{<span>    </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:red;">margin</span>: <span style="color:blue;">5px</span> <span style="color:blue;">5px</span> <span style="color:blue;">5px</span> <span style="color:blue;">0px</span>;<span>    </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:red;">width</span>: <span style="color:blue;">100%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';">}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#a31515;font-family:'Courier New';">.round_middle_panel</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';">{<span>    </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:red;">padding</span>: <span style="color:blue;">0px</span>;<span>    </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:red;">margin</span>: <span style="color:blue;">0px</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:red;">width</span>: <span style="color:blue;">98%</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';">}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#a31515;font-family:'Courier New';">.round_inner_panel</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';">{<span>    </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:red;">padding</span>: <span style="color:blue;">10px</span> <span style="color:blue;">20px</span> <span style="color:blue;">10px</span> <span style="color:blue;">20px</span>;<span>             </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:red;">width</span>: <span style="color:blue;">90%</span>;</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">}</span></p>
<p><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">Cheers -</p>
<p> </p>
<hr /><a title="web design and development company" href="http://www.2stepssolutions.com" target="_blank">2 Steps Solutions</a> <br />
Re-engineering your business</p>
<p></span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=55&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/11/06/roundedcornersextender-padding-and-margin-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>
	</item>
		<item>
		<title>Common function to dynamically fill dropdownlists and get selected text &#8211; better approach</title>
		<link>http://jibrankhan.wordpress.com/2008/06/29/common-function-to-dynamically-fill-dropdownlists-and-get-selected-text-better-approach/</link>
		<comments>http://jibrankhan.wordpress.com/2008/06/29/common-function-to-dynamically-fill-dropdownlists-and-get-selected-text-better-approach/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 13:45:39 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Controls]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=54</guid>
		<description><![CDATA[Now this is useful only if you don&#8217;t want to use Database for storing dropdownlist&#8217;s values, otherwise i would prefer using it DB or XML.
I&#8217;ll jump directly to the code, I hope you are not a newbie  
Enum for the type of dropdownlist to be filled:
public enum DDLType
{
Education = 1,
Experience,
Salary,
}
Filling dropdownlist based on enum [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=54&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Now this is useful only if you don&#8217;t want to use Database for storing dropdownlist&#8217;s values, otherwise i would prefer using it DB or XML.</p>
<p>I&#8217;ll jump directly to the code, I hope you are not a newbie <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Enum for the type of dropdownlist to be filled:</strong></p>
<p style="padding-left:30px;">public enum DDLType<br />
{<br />
Education = 1,<br />
Experience,<br />
Salary,<br />
}</p>
<p><strong>Filling dropdownlist based on enum value</strong></p>
<p style="padding-left:30px;">public class UtilityManager<br />
{</p>
<p style="padding-left:30px;"><em>//place for utility functions and inner classes&#8230;</em></p>
<p style="padding-left:30px;"><em>//Inner class for all the functions related to server side controls..</em><br />
public class ControlsManager<br />
{<br />
public static DropDownList FillDropDownList(DropDownList ddl, DDLType type)<br />
{<br />
switch ((int)type)<br />
{<span id="more-54"></span><br />
case (int)DDLType.Education:<br />
ddl.Items.Add(new ListItem(&#8220;Not Specified&#8221;, &#8220;1&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;None&#8221;, &#8220;2&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;High School&#8221;, &#8220;3&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;Diploma&#8221;, &#8220;4&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;2 Year Degree&#8221;, &#8220;5&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;4 Year Degree&#8221;, &#8220;6&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;Graduate Degree&#8221;, &#8220;7&#8243;));<br />
break;</p>
<p style="padding-left:30px;">case (int)DDLType.Experience:<br />
ddl.Items.Add(new ListItem(&#8220;Not Specified&#8221;, &#8220;1&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;Fresh/Internee&#8221;, &#8220;2&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;Less than 1 year&#8221;, &#8220;3&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;1-2 Years&#8221;, &#8220;4&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;2-4 Years&#8221;, &#8220;5&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;4-6 Years&#8221;, &#8220;6&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;6-8 Years&#8221;, &#8220;7&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;8-10 Years&#8221;, &#8220;8&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;10+ Years&#8221;, &#8220;9&#8243;));<br />
break;</p>
<p style="padding-left:30px;">case (int)DDLType.Salary:<br />
ddl.Items.Add(new ListItem(&#8220;Not Specified&#8221;, &#8220;1&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$10,000&#8243;, &#8220;2&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$20,000&#8243;, &#8220;3&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$30,000&#8243;, &#8220;4&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$40,000&#8243;, &#8220;5&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$50,000&#8243;, &#8220;6&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$60,000&#8243;, &#8220;7&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$70,000&#8243;, &#8220;8&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$80,000&#8243;, &#8220;9&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$90,000&#8243;, &#8220;10&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$100,000&#8243;, &#8220;11&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$110,000&#8243;, &#8220;12&#8243;));<br />
ddl.Items.Add(new ListItem(&#8220;$120,000&#8243;, &#8220;13&#8243;));<br />
break;<br />
}<br />
return ddl;<br />
}</p>
<p><strong>Getting the text for the selected value of the dropdownlist:</strong></p>
<p style="padding-left:30px;">public static string getDDLTextValue(string value, DDLType type)<br />
{<br />
DropDownList ddl = new DropDownList();</p>
<p style="padding-left:30px;">switch ((int)type)<br />
{<br />
UtilityManager.ControlsManager.FillDropDownList(ddl, type).Items.FindByValue(value).Text;<br />
case (int)DDLType.Experience:<br />
return UtilityManager.ControlsManager.FillDropDownList(ddl, type).Items.FindByValue(value).Text;<br />
case (int)DDLType.Salary:<br />
return UtilityManager.ControlsManager.FillDropDownList(ddl, type).Items.FindByValue(value).Text;<br />
default:<br />
return null;<br />
}<br />
}</p>
<p>   } //Controls manager ends..<br />
} // Utility manager ends..</p>
<p><strong>How to use it? Filling all dropwonlists.</strong></p>
<p>UtilityManager.ControlsManager.FillDropDownList(ddlCurrentSalary, DDLType.Salary);<br />
UtilityManager.ControlsManager.FillDropDownList(ddlExpectedSalary, DDLType.Salary);</p>
<p><strong>Get the text for selected value.</strong></p>
<p>UtilityManager.ControlsManager.getDDLTextValue(ddlExperience, DDLType.Experience);</p>
<p>Short and simple!!!!</p>
<p> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jibrankhan.wordpress.com/54/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jibrankhan.wordpress.com/54/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=54&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/06/29/common-function-to-dynamically-fill-dropdownlists-and-get-selected-text-better-approach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>
	</item>
		<item>
		<title>Countries Dropdownlist, Categories Dropdownlist</title>
		<link>http://jibrankhan.wordpress.com/2008/06/29/countries-dropdownlist-categories-dropdownlist/</link>
		<comments>http://jibrankhan.wordpress.com/2008/06/29/countries-dropdownlist-categories-dropdownlist/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 13:26:53 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[Goodies]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=53</guid>
		<description><![CDATA[Countries Dropdwonlist
&#60;asp:DropDownList id=&#8221;Country&#8221; runat=&#8221;server&#8221;&#62;
&#60;asp:ListItem Value=&#8221;" Selected=true&#62;Select Country&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AF&#8221;&#62;Afghanistan&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AL&#8221;&#62;Albania&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;DZ&#8221;&#62;Algeria&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AS&#8221;&#62;American Samoa&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AD&#8221;&#62;Andorra&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AO&#8221;&#62;Angola&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AI&#8221;&#62;Anguilla&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AQ&#8221;&#62;Antarctica&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AG&#8221;&#62;Antigua And Barbuda&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AR&#8221;&#62;Argentina&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AM&#8221;&#62;Armenia&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AW&#8221;&#62;Aruba&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AU&#8221;&#62;Australia&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AT&#8221;&#62;Austria&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;AZ&#8221;&#62;Azerbaijan&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BS&#8221;&#62;Bahamas&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BH&#8221;&#62;Bahrain&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BD&#8221;&#62;Bangladesh&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BB&#8221;&#62;Barbados&#60;/asp:ListItem&#62; 
&#60;asp:ListItem Value=&#8221;BY&#8221;&#62;Belarus&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BE&#8221;&#62;Belgium&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BZ&#8221;&#62;Belize&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BJ&#8221;&#62;Benin&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BM&#8221;&#62;Bermuda&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BT&#8221;&#62;Bhutan&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BO&#8221;&#62;Bolivia&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BA&#8221;&#62;Bosnia And Herzegowina&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BW&#8221;&#62;Botswana&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BV&#8221;&#62;Bouvet Island&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BR&#8221;&#62;Brazil&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;IO&#8221;&#62;British Indian Ocean Territory&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BN&#8221;&#62;Brunei Darussalam&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BG&#8221;&#62;Bulgaria&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BF&#8221;&#62;Burkina Faso&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;BI&#8221;&#62;Burundi&#60;/asp:ListItem&#62;
&#60;asp:ListItem Value=&#8221;KH&#8221;&#62;Cambodia&#60;/asp:ListItem&#62;
&#60;asp:ListItem [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=53&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong><span style="text-decoration:underline;">Countries Dropdwonlist<br />
</span></strong>&lt;asp:DropDownList id=&#8221;Country&#8221; runat=&#8221;server&#8221;&gt;<br />
&lt;asp:ListItem Value=&#8221;" Selected=true&gt;Select Country&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AF&#8221;&gt;Afghanistan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AL&#8221;&gt;Albania&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;DZ&#8221;&gt;Algeria&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AS&#8221;&gt;American Samoa&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AD&#8221;&gt;Andorra&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AO&#8221;&gt;Angola&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AI&#8221;&gt;Anguilla&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AQ&#8221;&gt;Antarctica&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AG&#8221;&gt;Antigua And Barbuda&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AR&#8221;&gt;Argentina&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AM&#8221;&gt;Armenia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AW&#8221;&gt;Aruba&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AU&#8221;&gt;Australia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AT&#8221;&gt;Austria&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AZ&#8221;&gt;Azerbaijan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BS&#8221;&gt;Bahamas&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BH&#8221;&gt;Bahrain&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BD&#8221;&gt;Bangladesh&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BB&#8221;&gt;Barbados&lt;/asp:ListItem&gt; <span id="more-53"></span><br />
&lt;asp:ListItem Value=&#8221;BY&#8221;&gt;Belarus&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BE&#8221;&gt;Belgium&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BZ&#8221;&gt;Belize&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BJ&#8221;&gt;Benin&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BM&#8221;&gt;Bermuda&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BT&#8221;&gt;Bhutan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BO&#8221;&gt;Bolivia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BA&#8221;&gt;Bosnia And Herzegowina&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BW&#8221;&gt;Botswana&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BV&#8221;&gt;Bouvet Island&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BR&#8221;&gt;Brazil&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;IO&#8221;&gt;British Indian Ocean Territory&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BN&#8221;&gt;Brunei Darussalam&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BG&#8221;&gt;Bulgaria&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BF&#8221;&gt;Burkina Faso&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;BI&#8221;&gt;Burundi&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KH&#8221;&gt;Cambodia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CM&#8221;&gt;Cameroon&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CA&#8221;&gt;Canada&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CV&#8221;&gt;Cape Verde&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KY&#8221;&gt;Cayman Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CF&#8221;&gt;Central African Republic&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TD&#8221;&gt;Chad&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CL&#8221;&gt;Chile&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CN&#8221;&gt;China&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CX&#8221;&gt;Christmas Island&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CC&#8221;&gt;Cocos (Keeling) Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CO&#8221;&gt;Colombia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KM&#8221;&gt;Comoros&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CG&#8221;&gt;Congo&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CK&#8221;&gt;Cook Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CR&#8221;&gt;Costa Rica&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CI&#8221;&gt;Cote D&#8217;Ivoire&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;HR&#8221;&gt;Croatia (Local Name: Hrvatska)&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CU&#8221;&gt;Cuba&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CY&#8221;&gt;Cyprus&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CZ&#8221;&gt;Czech Republic&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;DK&#8221;&gt;Denmark&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;DJ&#8221;&gt;Djibouti&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;DM&#8221;&gt;Dominica&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;DO&#8221;&gt;Dominican Republic&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TP&#8221;&gt;East Timor&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;EC&#8221;&gt;Ecuador&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;EG&#8221;&gt;Egypt&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SV&#8221;&gt;El Salvador&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GQ&#8221;&gt;Equatorial Guinea&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ER&#8221;&gt;Eritrea&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;EE&#8221;&gt;Estonia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ET&#8221;&gt;Ethiopia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;FK&#8221;&gt;Falkland Islands (Malvinas)&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;FO&#8221;&gt;Faroe Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;FJ&#8221;&gt;Fiji&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;FI&#8221;&gt;Finland&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;FR&#8221;&gt;France&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GF&#8221;&gt;French Guiana&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PF&#8221;&gt;French Polynesia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TF&#8221;&gt;French Southern Territories&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GA&#8221;&gt;Gabon&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GM&#8221;&gt;Gambia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GE&#8221;&gt;Georgia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;DE&#8221;&gt;Germany&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GH&#8221;&gt;Ghana&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GI&#8221;&gt;Gibraltar&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GR&#8221;&gt;Greece&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GL&#8221;&gt;Greenland&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GD&#8221;&gt;Grenada&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GP&#8221;&gt;Guadeloupe&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GU&#8221;&gt;Guam&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GT&#8221;&gt;Guatemala&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GN&#8221;&gt;Guinea&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GW&#8221;&gt;Guinea-Bissau&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GY&#8221;&gt;Guyana&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;HT&#8221;&gt;Haiti&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;HM&#8221;&gt;Heard And Mc Donald Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;VA&#8221;&gt;Holy See (Vatican City State)&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;HN&#8221;&gt;Honduras&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;HK&#8221;&gt;Hong Kong&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;HU&#8221;&gt;Hungary&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;IS&#8221;&gt;Icel And&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;IN&#8221;&gt;India&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ID&#8221;&gt;Indonesia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;IR&#8221;&gt;Iran (Islamic Republic Of)&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;IQ&#8221;&gt;Iraq&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;IE&#8221;&gt;Ireland&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;IL&#8221;&gt;Israel&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;IT&#8221;&gt;Italy&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;JM&#8221;&gt;Jamaica&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;JP&#8221;&gt;Japan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;JO&#8221;&gt;Jordan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KZ&#8221;&gt;Kazakhstan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KE&#8221;&gt;Kenya&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KI&#8221;&gt;Kiribati&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KP&#8221;&gt;Korea, Dem People&#8217;S Republic&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KR&#8221;&gt;Korea, Republic Of&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KW&#8221;&gt;Kuwait&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KG&#8221;&gt;Kyrgyzstan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LA&#8221;&gt;Lao People&#8217;S Dem Republic&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LV&#8221;&gt;Latvia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LB&#8221;&gt;Lebanon&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LS&#8221;&gt;Lesotho&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LR&#8221;&gt;Liberia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LY&#8221;&gt;Libyan Arab Jamahiriya&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LI&#8221;&gt;Liechtenstein&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LT&#8221;&gt;Lithuania&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LU&#8221;&gt;Luxembourg&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MO&#8221;&gt;Macau&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MK&#8221;&gt;Macedonia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MG&#8221;&gt;Madagascar&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MW&#8221;&gt;Malawi&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MY&#8221;&gt;Malaysia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MV&#8221;&gt;Maldives&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ML&#8221;&gt;Mali&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MT&#8221;&gt;Malta&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MH&#8221;&gt;Marshall Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MQ&#8221;&gt;Martinique&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MR&#8221;&gt;Mauritania&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MU&#8221;&gt;Mauritius&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;YT&#8221;&gt;Mayotte&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MX&#8221;&gt;Mexico&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;FM&#8221;&gt;Micronesia, Federated States&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MD&#8221;&gt;Moldova, Republic Of&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MC&#8221;&gt;Monaco&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MN&#8221;&gt;Mongolia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MS&#8221;&gt;Montserrat&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MA&#8221;&gt;Morocco&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MZ&#8221;&gt;Mozambique&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MM&#8221;&gt;Myanmar&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NA&#8221;&gt;Namibia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NR&#8221;&gt;Nauru&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NP&#8221;&gt;Nepal&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NL&#8221;&gt;Netherlands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AN&#8221;&gt;Netherlands Ant Illes&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NC&#8221;&gt;New Caledonia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NZ&#8221;&gt;New Zealand&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NI&#8221;&gt;Nicaragua&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NE&#8221;&gt;Niger&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NG&#8221;&gt;Nigeria&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NU&#8221;&gt;Niue&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NF&#8221;&gt;Norfolk Island&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;MP&#8221;&gt;Northern Mariana Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;NO&#8221;&gt;Norway&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;OM&#8221;&gt;Oman&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PK&#8221;&gt;Pakistan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PW&#8221;&gt;Palau&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PA&#8221;&gt;Panama&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PG&#8221;&gt;Papua New Guinea&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PY&#8221;&gt;Paraguay&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PE&#8221;&gt;Peru&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PH&#8221;&gt;Philippines&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PN&#8221;&gt;Pitcairn&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PL&#8221;&gt;Poland&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PT&#8221;&gt;Portugal&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PR&#8221;&gt;Puerto Rico&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;QA&#8221;&gt;Qatar&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;RE&#8221;&gt;Reunion&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;RO&#8221;&gt;Romania&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;RU&#8221;&gt;Russian Federation&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;RW&#8221;&gt;Rwanda&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;KN&#8221;&gt;Saint K Itts And Nevis&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LC&#8221;&gt;Saint Lucia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;VC&#8221;&gt;Saint Vincent, The Grenadines&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;WS&#8221;&gt;Samoa&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SM&#8221;&gt;San Marino&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ST&#8221;&gt;Sao Tome And Principe&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SA&#8221;&gt;Saudi Arabia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SN&#8221;&gt;Senegal&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SC&#8221;&gt;Seychelles&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SL&#8221;&gt;Sierra Leone&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SG&#8221;&gt;Singapore&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SK&#8221;&gt;Slovakia (Slovak Republic)&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SI&#8221;&gt;Slovenia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SB&#8221;&gt;Solomon Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SO&#8221;&gt;Somalia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ZA&#8221;&gt;South Africa&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GS&#8221;&gt;South Georgia , S Sandwich Is.&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ES&#8221;&gt;Spain&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;LK&#8221;&gt;Sri Lanka&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SH&#8221;&gt;St. Helena&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;PM&#8221;&gt;St. Pierre And Miquelon&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SD&#8221;&gt;Sudan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SR&#8221;&gt;Suriname&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SJ&#8221;&gt;Svalbard, Jan Mayen Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SZ&#8221;&gt;Sw Aziland&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SE&#8221;&gt;Sweden&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;CH&#8221;&gt;Switzerland&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;SY&#8221;&gt;Syrian Arab Republic&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TW&#8221;&gt;Taiwan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TJ&#8221;&gt;Tajikistan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TZ&#8221;&gt;Tanzania, United Republic Of&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TH&#8221;&gt;Thailand&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TG&#8221;&gt;Togo&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TK&#8221;&gt;Tokelau&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TO&#8221;&gt;Tonga&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TT&#8221;&gt;Trinidad And Tobago&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TN&#8221;&gt;Tunisia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TR&#8221;&gt;Turkey&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TM&#8221;&gt;Turkmenistan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TC&#8221;&gt;Turks And Caicos Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;TV&#8221;&gt;Tuvalu&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;UG&#8221;&gt;Uganda&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;UA&#8221;&gt;Ukraine&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;AE&#8221;&gt;United Arab Emirates&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;GB&#8221;&gt;United Kingdom&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;US&#8221;&gt;United States&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;UM&#8221;&gt;United States Minor Is.&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;UY&#8221;&gt;Uruguay&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;UZ&#8221;&gt;Uzbekistan&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;VU&#8221;&gt;Vanuatu&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;VE&#8221;&gt;Venezuela&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;VN&#8221;&gt;Viet Nam&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;VG&#8221;&gt;Virgin Islands (British)&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;VI&#8221;&gt;Virgin Islands (U.S.)&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;WF&#8221;&gt;Wallis And Futuna Islands&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;EH&#8221;&gt;Western Sahara&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;YE&#8221;&gt;Yemen&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;YU&#8221;&gt;Yugoslavia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ZR&#8221;&gt;Zaire&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ZM&#8221;&gt;Zambia&lt;/asp:ListItem&gt;<br />
&lt;asp:ListItem Value=&#8221;ZW&#8221;&gt;Zimbabwe&lt;/asp:ListItem&gt;<br />
&lt;/asp:DropDownList&gt;</p>
<p><strong><span style="text-decoration:underline;">Categordies Dropdownlist<br />
</span></strong>&lt;select id=&#8221;ddlCategories&#8221;&gt;<br />
  &lt;option value=&#8221;0&#8243;&gt;Select Category&lt;/option&gt;<br />
  &lt;option value=&#8221;2&#8243;&gt;Advertising Management&lt;/option&gt;<br />
  &lt;option value=&#8221;3&#8243;&gt;Banking&lt;/option&gt;<br />
  &lt;option value=&#8221;4&#8243;&gt;Call Center&lt;/option&gt;<br />
  &lt;option value=&#8221;34&#8243;&gt;Computer &amp;amp; Networking&lt;/option&gt;<br />
  &lt;option value=&#8221;5&#8243;&gt;Constructions&lt;/option&gt;<br />
  &lt;option value=&#8221;33&#8243;&gt;Creit Risk Management&lt;/option&gt;<br />
  &lt;option value=&#8221;6&#8243;&gt;Distrebution &amp;amp; Delivery/Courier&lt;/option&gt;<br />
  &lt;option value=&#8221;7&#8243;&gt;Entertainement&lt;/option&gt;<br />
  &lt;option value=&#8221;8&#8243;&gt;Export/Import&lt;/option&gt;<br />
  &lt;option value=&#8221;9&#8243;&gt;Finance and Accounting&lt;/option&gt;<br />
  &lt;option value=&#8221;10&#8243;&gt;Financial Services&lt;/option&gt;<br />
  &lt;option value=&#8221;11&#8243;&gt;Health Care&lt;/option&gt;<br />
  &lt;option value=&#8221;12&#8243;&gt;Hotels/Restaurents&lt;/option&gt;<br />
  &lt;option value=&#8221;13&#8243;&gt;Human Resources&lt;/option&gt;<br />
  &lt;option value=&#8221;30&#8243;&gt;Information Technology&lt;/option&gt;<br />
  &lt;option value=&#8221;14&#8243;&gt;Insurance&lt;/option&gt;<br />
  &lt;option value=&#8221;15&#8243;&gt;Jurnalism&lt;/option&gt;<br />
  &lt;option value=&#8221;16&#8243;&gt;Legal / Law&lt;/option&gt;<br />
  &lt;option value=&#8221;17&#8243;&gt;Marketing &amp;amp; Communication&lt;/option&gt;<br />
  &lt;option value=&#8221;18&#8243;&gt;Media&lt;/option&gt;<br />
  &lt;option value=&#8221;19&#8243;&gt;Oil &amp;amp; Gas&lt;/option&gt;<br />
  &lt;option value=&#8221;20&#8243;&gt;Others&lt;/option&gt;<br />
  &lt;option value=&#8221;21&#8243;&gt;Pharamcetical / Biotechnology&lt;/option&gt;<br />
  &lt;option value=&#8221;22&#8243;&gt;Production / Engineering / R&amp;amp;D&lt;/option&gt;<br />
  &lt;option value=&#8221;23&#8243;&gt;Purchase / Supply Cahins&lt;/option&gt;<br />
  &lt;option value=&#8221;24&#8243;&gt;Retail Chains / Shops&lt;/option&gt;<br />
  &lt;option value=&#8221;32&#8243;&gt;Risk Management&lt;/option&gt;<br />
  &lt;option value=&#8221;25&#8243;&gt;Sales&lt;/option&gt;<br />
  &lt;option value=&#8221;26&#8243;&gt;Senior Management&lt;/option&gt;<br />
  &lt;option value=&#8221;27&#8243;&gt;Software /Hardware / EDP&lt;/option&gt;<br />
  &lt;option value=&#8221;29&#8243;&gt;Travel / Airlines&lt;/option&gt;<br />
 &lt;/select&gt;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jibrankhan.wordpress.com/53/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jibrankhan.wordpress.com/53/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=53&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/06/29/countries-dropdownlist-categories-dropdownlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom SessionManager, a better way of handling your session variables.</title>
		<link>http://jibrankhan.wordpress.com/2008/06/23/custom-sessionmanager-a-better-way-of-handling-your-session-variables/</link>
		<comments>http://jibrankhan.wordpress.com/2008/06/23/custom-sessionmanager-a-better-way-of-handling-your-session-variables/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 12:21:37 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Sessions]]></category>
		<category><![CDATA[Reusable Code]]></category>
		<category><![CDATA[Session Management]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=50</guid>
		<description><![CDATA[This is a custom built reusable SessionManager Class to keep track of all the used session variables in a web application. You don&#8217;t need to remember them or type them by hand every time you need to access them and with typed dataset rows, life becomes allot more easier but above all there is no need [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=50&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a custom built reusable <strong>SessionManager Class </strong>to keep track of all the used session variables in a web application. You don&#8217;t need to remember them or type them by hand every time you need to access them and with typed dataset rows, life becomes allot more easier but above all there is no need of casting where ever you access a session object, believe me, that&#8217;s the best part.</p>
<p><span style="font-size:10pt;color:#0000ff;font-family:'Courier New';">public</span><span style="font-size:10pt;font-family:'Courier New';"> <span style="color:#0000ff;">class</span> <span style="color:#008080;">SessionManager<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';">{<br />
</span><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#008000;">//set the login status in session for the current user.<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void </span>setIsLoggedIn(<span style="color:#0000ff;">bool</span> value)<br />
</span><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>{<br />
</span><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#008000;">//value is true when the the usser logs in<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"isLoggedIn"</span>] = value;<br />
</span><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#008000;">//value is false when the the usser logsout<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">if</span> (!value)<br />
</span><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"isLoggedIn"</span>] = <span style="color:#0000ff;">null</span>;<br />
</span><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#008000;">//check to see if the user is logged in</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">bool </span>isLoggedIn()</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">if</span> (<span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"isLoggedIn"</span>].Equals(<span style="color:#0000ff;">null</span>))</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#0000ff;">return</span> <span style="color:#0000ff;">false</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">else</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#0000ff;">return</span> <span style="color:#0000ff;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>}<span>    </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#008000;">//set current employee in the sessoin</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void </span>setCurrentEmployee(dsEmployees.EmployeesRow value)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"Employee"</span>] = value;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">if</span> (value != <span style="color:#0000ff;">null</span>)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#008000;">//following variables are set separately to be used in bindable control like</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#008000;">//GridView, DataList etc..</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"EmployeeId"</span>] = value.EmployeeId;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"Name"</span>] = value.FirstName + <span style="color:#800000;">&#8221; &#8220;</span> +</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>                </span>value.MiddleName + <span style="color:#800000;">&#8221; &#8220;</span>+ value.LastName;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#008000;">//get current employee fro the session</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static </span>dsEmployees.EmployeesRow getCurrentEmployee()</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">return</span>(dsEmployees.EmployeesRow)<span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"Employee"</span>];</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#008000;">//bonus functions &#8211; to be used on the pages where it is neccessary for the users to login</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void </span>setRedirectUrl(<span style="color:#0000ff;">string</span>redirectURL)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"redirectURL"</span>] = redirectURL;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#008000;">//bonus functions &#8211; once the users log in, they will be redirected back to the previously</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#008000;">//stored url or redirected to the default page</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">string</span>getRedirectUrl()</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">if</span> (<span style="color:#0000ff;">object</span>.Equals(<span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"redirectURL"</span>], <span style="color:#0000ff;">null</span>))</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#0000ff;">return</span> <span style="color:#800000;">&#8220;myaccount.aspx&#8221;</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">else</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#0000ff;">return</span> <span style="color:#008080;">HttpContext</span>.Current.Session[<span style="color:#800000;">"redirectURL"</span>].ToString();</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span>    </span>}</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">}</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">Analyze one thing that setCurrentEmployee is taking the entire typed dataset&#8217;s row of the currently logged in user. This practice helps a great deal to quickly access any value from the currently logged in user&#8217;s details instead of hitting the database again and again and of course, typed datarow helps you avoid any mistakes in writing field names <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">Here is a sample code to set and get login sessoin variables.</span></p>
<div><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;color:#0000ff;font-family:'Courier New';">protected</span><span style="font-size:10pt;font-family:'Courier New';"> <span style="color:#0000ff;">void</span>Login()</span></span></div>
<p> </p>
<div></div>
<p><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span>Page.Validate();</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">if</span>(!Page.IsValid)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#0000ff;">return</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span>dsEmployeesTableAdapters.EmployeesTableAdapter ta = <span style="color:#0000ff;">new</span> dsEmployeesTableAdapters.EmployeesTableAdapter();</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span>dsEmployees.EmployeesDataTable dt = ta.Login(txtuid.Text.Trim(), txtPassword.Text.Trim());</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">if</span>(dt.Rows.Count &gt; 0)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span>dsEmployees.EmployeesRow row = dt[0];<br />
</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"> <span style="font-size:10pt;font-family:'Courier New';"><span><span style="font-size:10pt;color:#008000;font-family:'Courier New';">//set current user as logged in<br />
</span></span></span></p>
<div class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span><span style="font-size:10pt;font-family:'Courier New';"><span>                </span><strong>EmployeeSession.setIsLoggedIn(<span style="color:#0000ff;">true</span>);</strong></span><span style="font-size:10pt;font-family:'Courier New';"><strong> </strong></span></span></span></div>
<div><span style="font-size:10pt;font-family:'Courier New';"><span style="font-family:'Courier New';"> </span></span></div>
<div><span style="font-size:10pt;font-family:'Courier New';"><span style="font-family:'Courier New';"><strong><span style="font-size:10pt;font-family:'Courier New';"><span>                </span>EmployeeSession.setRedirectUrl(<span style="color:#0000ff;">null</span>);</span><span style="font-size:10pt;font-family:'Courier New';"> <br />
</span></strong><span style="font-size:10pt;font-family:'Courier New';"><strong><span>                </span>Response.Redirect(rediectURL);</strong></span><span style="font-size:10pt;font-family:'Courier New';"> <br />
</span><span style="font-size:10pt;font-family:'Courier New';"><span>        </span>}</span></span></span></div>
<div><span style="font-size:10pt;font-family:'Courier New';"><span style="font-family:'Courier New';"> </span></span></div>
<p><span style="font-size:10pt;font-family:'Courier New';"><span style="font-family:'Courier New';"> </p>
<p></span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:#0000ff;">return</span>;</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span>    </span>}</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;">Now it is very easy to check if the user is logged in.</p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#008000;font-family:'Courier New';">//check if the user is logged in</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span><span style="color:#0000ff;">if</span> <strong>(!EmployeeSession.isLoggedIn())</strong></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>        </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#008000;">//store current url and redirect to the login page</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span><span style="color:#0000ff;">string</span>url = Request.Url.AbsoluteUri.ToString();</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><strong><span>            </span>EmployeeSession.setRedirectUrl(url);</strong></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span>            </span>Response.Redirect(<span style="color:#800000;">&#8220;login.aspx&#8221;</span>);</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;">Accessing the data of the currently logged in user is piece of cake now. </p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;"><span>          </span><span style="color:#008000;">//check if the user is logged in<br />
</span></span><span style="font-size:10pt;"><span>            </span><span style="color:#0000ff;">if</span> <strong>(EmployeeSession.isLoggedIn())<br />
</strong></span><span style="font-size:10pt;"><span>            </span>{<br />
</span><span style="font-size:10pt;"><span>                </span><span style="color:#008000;">//display the name of the user from the session object<br />
</span></span><span style="font-size:10pt;"><span>                </span>lblName.Text = <strong>SessionManager.getCurrentEmployee().Name;<br />
</strong></span><span style="font-size:10pt;line-height:115%;"><span>            </span>}</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;">Hope it helps, if you need more on it, drop me a few lines.</p>
<p></span></p>
<p>Cheers -</p>
<p> </p>
<hr /><a title="web design and development company" href="http://www.2stepssolutions.com" target="_blank">2 Steps Solutions</a> <br />
Re-engineering your business</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jibrankhan.wordpress.com/50/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jibrankhan.wordpress.com/50/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=50&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/06/23/custom-sessionmanager-a-better-way-of-handling-your-session-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>
	</item>
		<item>
		<title>Both DataSource and DataSourceID are defined on &#8216;GridView1&#8242;.  Remove one definition. &#8211; Bind multiple datasources to a gridview control</title>
		<link>http://jibrankhan.wordpress.com/2008/06/18/both-datasource-and-datasourceid-are-defined-on-gridview1-remove-one-definition-bind-multiple-datasources-to-a-gridview-control/</link>
		<comments>http://jibrankhan.wordpress.com/2008/06/18/both-datasource-and-datasourceid-are-defined-on-gridview1-remove-one-definition-bind-multiple-datasources-to-a-gridview-control/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 18:51:24 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[Data Binding]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=23</guid>
		<description><![CDATA[Both DataSource and DataSourceID are defined on &#8216;GridView1&#8242;.  Remove one definition. 
OK, so this is the message that you get most of the times when you try to bind your gridview or any other bindable controls, to multiple DataSources.
 It happens most of the times when you bind your GridView control to an ObjectDataSouce or SqlDataSource [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=23&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style="color:#993300;"><em>Both DataSource and DataSourceID are defined on &#8216;GridView1&#8242;.  Remove one definition.</em> </span></p>
<p>OK, so this is the message that you get most of the times when you try to bind your gridview or any other bindable controls, to multiple DataSources.</p>
<p> It happens most of the times when you bind your GridView control to an ObjectDataSouce or SqlDataSource on the design surface and then you try to bind the same GridView in code behind using the manual coding and sometimes it becomes necessary to do so in the scenarios of searching and manual paging etc.</p>
<p><em><span style="text-decoration:underline;">(Binding to ObjectDataSource)</span></em></p>
<p> <a href="http://jibrankhan.files.wordpress.com/2008/06/datasource.jpg"><img class="alignnone size-medium wp-image-27" src="http://jibrankhan.files.wordpress.com/2008/06/datasource.jpg?w=300&#038;h=124" alt="ObjectDataSource Binding" width="300" height="124" /></a><br />
<em><br />
<span style="text-decoration:underline;">(Binding to manual DataSource)<br />
</span></em><br />
GridView1.DataSource = null;<br />
GridView1.DataSource = myDataTable;<br />
GridView1.DataBind();</p>
<p>This is not going to solve the problem, the simples workaround is <span id="more-23"></span>to set the <strong>DataSourceID</strong> to null.</p>
<p>GridView1.DataSourceID = null;<br />
GridView1.DataSource = dt;<br />
GridView1.DataBind();</p>
<p>now this is going to work perfectly fine but DataGrid required a page developer to write custom code to handle simple operations such as paging, sorting, editing or deleting data, the GridView control can automatically handle these operations provided its bound data source control supports these capabilities and we know that this kind of custom binding will kill any chances to automate your GridView to handle all these operations automatically.</p>
<p>Simplest way to resolve this issue is to display your required data to the client and then bind back the GridView to your original datasouce by setting the DataSourceID to null again. That will bring back all your automation functionality back to the GridView.</p>
<p>Cheers -</p>
<hr /><a title="web design and development company" href="http://www.2stepssolutions.com" target="_blank">2 Steps Solutions</a> <br />
Re-engineering your business</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jibrankhan.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jibrankhan.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=23&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/06/18/both-datasource-and-datasourceid-are-defined-on-gridview1-remove-one-definition-bind-multiple-datasources-to-a-gridview-control/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>

		<media:content url="http://jibrankhan.files.wordpress.com/2008/06/datasource.jpg?w=300" medium="image">
			<media:title type="html">ObjectDataSource Binding</media:title>
		</media:content>
	</item>
		<item>
		<title>C# for newbies (C# Terminology/Technical Words)</title>
		<link>http://jibrankhan.wordpress.com/2008/06/18/c-for-newbies-c-terminologiestechnical-words/</link>
		<comments>http://jibrankhan.wordpress.com/2008/06/18/c-for-newbies-c-terminologiestechnical-words/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 07:11:47 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Object Oriented Programming]]></category>
		<category><![CDATA[OOP]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=21</guid>
		<description><![CDATA[Good C# startup for those who are new to programming/c#/asp.net http://msdn.microsoft.com/en-us/library/ms173231.aspx
For programming guide have a look at http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx


access modifier 
A keyword, such as private, protected, internal, or public, that restricts access to a type or type member. For more information, see Access Modifiers.


 
accessible member 
A member that can be accessed by a given type. An accessible member for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=21&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="title">Good C# startup for those who are new to programming/c#/asp.net <a href="http://msdn.microsoft.com/en-us/library/ms173231.aspx">http://msdn.microsoft.com/en-us/library/ms173231.aspx</a></div>
<div class="title">For programming guide have a look at <a href="http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx">http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx</a></div>
<div class="title">
<dl>
<dt>access modifier </dt>
<dd>A keyword, such as <a id="ctl00_rs1_mainContentContainer_ctl01" href="http://msdn.microsoft.com/en-us/library/st6sy9xe.aspx">private</a>, <a id="ctl00_rs1_mainContentContainer_ctl02" href="http://msdn.microsoft.com/en-us/library/bcd5672a.aspx">protected</a>, <a id="ctl00_rs1_mainContentContainer_ctl03" href="http://msdn.microsoft.com/en-us/library/7c5ka91b.aspx">internal</a>, or <a id="ctl00_rs1_mainContentContainer_ctl04" href="http://msdn.microsoft.com/en-us/library/yzh058ae.aspx">public</a>, that restricts access to a type or type member. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl05" href="http://msdn.microsoft.com/en-us/library/ms173121.aspx">Access Modifiers</a>.</dd>
</dl>
</div>
<p> </p>
<dt>accessible member </dt>
<dd>A member that can be accessed by a given type. An accessible member for one type is not necessarily accessible to another type. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl06" href="http://msdn.microsoft.com/en-us/library/ms173121.aspx">Access Modifiers</a> and <a id="ctl00_rs1_mainContentContainer_ctl07" href="http://msdn.microsoft.com/en-us/library/0tke9fxk.aspx">Friend Assemblies</a>.</dd>
<dt>accessor </dt>
<dd>A method that sets or retrieves the value of a private <span id="more-21"></span>data member value that is associated with a property. Read-write properties have <span class="keyword">get</span> and <span class="keyword">set</span> accessors. Properties that are read-only have only a <span class="keyword">get</span> accessor. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl08" href="http://msdn.microsoft.com/en-us/library/x9fsa0sw.aspx">Properties</a>.</dd>
<dt>anonymous method </dt>
<dd>An anonymous method is a code block that is passed as a parameter to a <a id="ctl00_rs1_mainContentContainer_ctl09" href="http://msdn.microsoft.com/en-us/library/900fyy8e.aspx">delegate</a>. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl10" href="http://msdn.microsoft.com/en-us/library/0yw3tz5k.aspx">Anonymous Methods</a>.</dd>
<dt>base class </dt>
<dd>A <a id="ctl00_rs1_mainContentContainer_ctl11" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> that is inherited by another &#8216;derived&#8217; class. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl12" href="http://msdn.microsoft.com/en-us/library/ms173149.aspx">Inheritance</a>.</dd>
<dt>call stack </dt>
<dd>The series of method calls leading from the beginning of the program to the statement currently being executed at run time.</dd>
<dt>class </dt>
<dd>A data type that describes an object. Classes contain both data, and the methods for acting on the data. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl13" href="http://msdn.microsoft.com/en-us/library/x9afc042.aspx">Classes</a>.</dd>
<dt>constructor </dt>
<dd>A special method on a class or struct that initializes the objects of that type. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl14" href="http://msdn.microsoft.com/en-us/library/ace5hbzh.aspx">Constructors</a>.</dd>
<dt>delegate </dt>
<dd>A delegate is a type that references a method. Once a delegate is assigned a method, it behaves exactly like that method. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl15" href="http://msdn.microsoft.com/en-us/library/ms173171.aspx">Delegates</a>.</dd>
<dt>derived class </dt>
<dd>A <a id="ctl00_rs1_mainContentContainer_ctl16" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> that uses inheritance to gain, augment, or modify the behavior and data of another &#8216;base&#8217; class. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl17" href="http://msdn.microsoft.com/en-us/library/ms173149.aspx">Inheritance</a>.</dd>
<dt>destructor </dt>
<dd>A special method on a <a id="ctl00_rs1_mainContentContainer_ctl18" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> or <a id="ctl00_rs1_mainContentContainer_ctl19" href="http://msdn.microsoft.com/en-us/library/ah19swz4.aspx">struct</a> that prepares the instance for destruction by the system. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl20" href="http://msdn.microsoft.com/en-us/library/66x5fx1b.aspx">Destructors</a>.</dd>
<dt>event </dt>
<dd>A member of a <a id="ctl00_rs1_mainContentContainer_ctl21" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> or <a id="ctl00_rs1_mainContentContainer_ctl22" href="http://msdn.microsoft.com/en-us/library/ah19swz4.aspx">struct</a> that sends notifications of a change. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl23" href="http://msdn.microsoft.com/en-us/library/awbftdfh.aspx">Events</a>.</dd>
<dt>field </dt>
<dd>A data member of a <a id="ctl00_rs1_mainContentContainer_ctl24" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> or <a id="ctl00_rs1_mainContentContainer_ctl25" href="http://msdn.microsoft.com/en-us/library/ah19swz4.aspx">struct</a> that is accessed directly.</dd>
<dt>generics </dt>
<dd>Generics allow you to define a <a id="ctl00_rs1_mainContentContainer_ctl26" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> and or method that are defined with a type parameter. When client code instantiates the type, it specifies a particular type as an argument. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl27" href="http://msdn.microsoft.com/en-us/library/512aeb7t.aspx">Generics</a>.</dd>
<dt>IDE </dt>
<dd>Integrated Development Environment. The application that provides the unified user interface for the various development tools including the compiler, debugger, code editor, and designers.</dd>
<dt>immutable type </dt>
<dd>A type whose instance data, fields and properties, does not change after the instance is created. Most value types are immutable.</dd>
<dt>inaccessible member </dt>
<dd>A member that cannot be accessed by a given type. An inaccessible member for one type is not necessarily inaccessible to another type. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl28" href="http://msdn.microsoft.com/en-us/library/ms173121.aspx">Access Modifiers</a>.</dd>
<dt>inheritance </dt>
<dd>C# supports inheritance, so a <a id="ctl00_rs1_mainContentContainer_ctl29" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> that derives from another class, known as the base class, inherits the same methods and properties. Inheritance involves base classes and derived classes. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl30" href="http://msdn.microsoft.com/en-us/library/ms173149.aspx">Inheritance</a>.</dd>
<dt>interface </dt>
<dd>A type that contains only the signatures of public methods, events, and delegates. An object that inherits the interface must implement all of the methods and events defined in the interface. Classes or structs may inherit any number of interfaces. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl31" href="http://msdn.microsoft.com/en-us/library/ms173156.aspx">Interfaces</a></dd>
<dt>iterator </dt>
<dd>An iterator is a method that enables consumers of a <a id="ctl00_rs1_mainContentContainer_ctl32" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> that contains a collection or array to use <a id="ctl00_rs1_mainContentContainer_ctl33" href="http://msdn.microsoft.com/en-us/library/ttw7t8t6.aspx">foreach, in (C# Reference)</a> to iterate through that collection or array.</dd>
<dt>member </dt>
<dd>A field, property, method, or event declared on a <a id="ctl00_rs1_mainContentContainer_ctl34" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> or <a id="ctl00_rs1_mainContentContainer_ctl35" href="http://msdn.microsoft.com/en-us/library/ah19swz4.aspx">struct</a>.</dd>
<dt>method </dt>
<dd>A named code block that provides behavior for a <a id="ctl00_rs1_mainContentContainer_ctl36" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> or <a id="ctl00_rs1_mainContentContainer_ctl37" href="http://msdn.microsoft.com/en-us/library/ah19swz4.aspx">struct</a>.</dd>
<dt>mutable type </dt>
<dd>A type whose instance data, fields and properties, can be changed after the instance is created. Most <a id="ctl00_rs1_mainContentContainer_ctl38" href="http://msdn.microsoft.com/en-us/library/490f96s2.aspx">Reference Types</a> are mutable.</dd>
<dt>nested type </dt>
<dd>A type declared within the declaration of another type.</dd>
<dt>object </dt>
<dd>An instance of a <a id="ctl00_rs1_mainContentContainer_ctl39" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a>. An object exists in memory, and has data and methods that act on the data. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl40" href="http://msdn.microsoft.com/en-us/library/ms173109.aspx">Objects, Classes, and Structs</a>.</dd>
<dt>property </dt>
<dd>A data member accessed by means of an accessor. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl41" href="http://msdn.microsoft.com/en-us/library/x9fsa0sw.aspx">Properties</a>.</dd>
<dt>refactoring </dt>
<dd>Reusing previously entered code. The Visual C# Express Code Editor can intelligently reformat code to, for example, turn a block of highlight code into a method. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl42" href="http://msdn.microsoft.com/en-us/library/719exd8s.aspx">Refactoring</a>.</dd>
<dt>reference type </dt>
<dd>A data type. A variable declared as a reference type points to a location where data is stored. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl43" href="http://msdn.microsoft.com/en-us/library/490f96s2.aspx">Reference Types</a>.</dd>
<dt>static </dt>
<dd>A class or method declared as static exists without first being instantiated using the keyword <span class="keyword">new</span>. <span class="code">Main()</span> is a static method. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl44" href="http://msdn.microsoft.com/en-us/library/79b3xss3.aspx">Static Classes and Static Class Members</a>.</dd>
<dt>struct </dt>
<dd>A compound data type that is typically used to contain a few variables that have some logical relationship. Structs can also contain methods and events. Structs do not support inheritance but they do support interfaces. A struct is a <a id="ctl00_rs1_mainContentContainer_ctl45" href="http://msdn.microsoft.com/en-us/library/s1ax56ch.aspx">value type</a>, while a <a id="ctl00_rs1_mainContentContainer_ctl46" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> is a <a id="ctl00_rs1_mainContentContainer_ctl47" href="http://msdn.microsoft.com/en-us/library/490f96s2.aspx">reference type</a>. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl48" href="http://msdn.microsoft.com/en-us/library/saxz13w4.aspx">Structs</a>.</dd>
<dt>value type </dt>
<dd>A value type is a data type that is allocated on the stack, as opposed to a reference type which is allocated on the heap. The <a id="ctl00_rs1_mainContentContainer_ctl49" href="http://msdn.microsoft.com/en-us/library/ya5y69ds.aspx">built-In types</a>, including the numeric types as well as the struct type and the nullable type, are all value types. The <a id="ctl00_rs1_mainContentContainer_ctl50" href="http://msdn.microsoft.com/en-us/library/0b0thckt.aspx">class</a> type and <a id="ctl00_rs1_mainContentContainer_ctl51" href="http://msdn.microsoft.com/en-us/library/362314fe.aspx">string</a> type are <a id="ctl00_rs1_mainContentContainer_ctl52" href="http://msdn.microsoft.com/en-us/library/490f96s2.aspx">reference types</a>. For more information, see <a id="ctl00_rs1_mainContentContainer_ctl53" href="http://msdn.microsoft.com/en-us/library/s1ax56ch.aspx">Value Types (C# Reference)</a>.</dd>
<dl></dl>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jibrankhan.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jibrankhan.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=21&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/06/18/c-for-newbies-c-terminologiestechnical-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>
	</item>
		<item>
		<title>Object Initializers (What&#8217;s new in C#)</title>
		<link>http://jibrankhan.wordpress.com/2008/06/18/object-initializers-whats-new-in-c/</link>
		<comments>http://jibrankhan.wordpress.com/2008/06/18/object-initializers-whats-new-in-c/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 06:59:30 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=20</guid>
		<description><![CDATA[I love some of the new features in c#, specially the syntactic changes and enhancements are great to achieve greater productivity (I have my own reservations on the efficiency though, but that&#8217;s debatable)  
Lets take a look at the new Object initializers in C#
Now you can assign values to any accessible properties (fields) of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=20&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I love some of the new features in c#, specially the syntactic changes and enhancements are great to achieve greater productivity (I have my own reservations on the efficiency though, but that&#8217;s debatable) <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Lets take a look at the new Object initializers in C#</p>
<p>Now you can assign values to any accessible properties (fields) of an object at its creation time. It actually avoids the necessity of invoking the constructor to do so.  lets take a look at an example with a name type before moving on to the anonymous types.</p>
<p><span style="color:#0000ff;">private</span> <span style="color:#0000ff;">class</span> Student<br />
{<br />
    <span style="color:#008000;">// Auto-implemented properties (We&#8217;ll discuss them in the next post of this series)</span><br />
    <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">int</span> Name { <span style="color:#0000ff;">get</span>; <span style="color:#0000ff;">set</span>; }<br />
    <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> RegistrationNumber { <span style="color:#0000ff;">get</span>; <span style="color:#0000ff;">set</span>; }<br />
}</p>
<p><span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void </span>NewStudent()<br />
{<br />
    <span style="color:#008000;">// Object initializer</span><br />
    Student student = <span style="color:#0000ff;">new</span> Student{ Name = <span style="color:#800000;"><span style="color:#800000;">&#8220;Khan&#8221;</span></span>, RegistrationNumber = 7728 };<br />
}</p>
<p>Object initializers are very useful with LINQ query expressions. Query expressions use anonymous types frequently which can only be<span id="more-20"></span> initialized through object initializers. This is very useful when you want to store some of the selected information for each object in a collection.</p>
<p> with Let&#8217;s take a look at the anonymous object initializers example.</p>
<p><span style="color:#0000ff;">var</span> students =<br />
    from s <span style="color:#0000ff;">in</span> students<br />
    select <span style="color:#0000ff;">new</span> { s.Name };</p>
<p>Continuing from my previous example, this time in students collection we need to store only names not the registration number.</p>
<p>That&#8217;s a quick and easy one, wait for more :)</p>
<p>Cheers!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jibrankhan.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jibrankhan.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=20&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/06/18/object-initializers-whats-new-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>
	</item>
		<item>
		<title>var type and anonymous classes in c# 3.0</title>
		<link>http://jibrankhan.wordpress.com/2008/06/12/var-type-and-anonymous-classes-in-c-30/</link>
		<comments>http://jibrankhan.wordpress.com/2008/06/12/var-type-and-anonymous-classes-in-c-30/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 21:14:39 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=16</guid>
		<description><![CDATA[Whats new in c# 3.0<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=16&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The new var type in c# 3.0 and anonymous types will help developers a great deal in extending their programming capablities and creat obejects on the fly without actually writing classes.</p>
<p>Existing .NET developers may have some reservations on the new var type but believe me alot of new commers from the open source world, specially PHP, would love to have this feature to get some familiarity, which otherwise is not there at all for them in .NET platform.</p>
<p>Anyway, for thoe who have no idea of what i am talking about here is a small code snippet to have a better understanding.</p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;color:#0000ff;line-height:115%;">var</span><span style="font-size:10pt;line-height:115%;"> myAnnonynomousItem = <span style="color:#0000ff;">new</span> {car=<span style="color:#800000;">&#8220;lexus&#8221;</span>, color=<span style="color:#800000;">&#8220;black&#8221;</span>, maxSpeed=4200}</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;">Compiler generates a classes for every annonymous type automatically.</span></p>
<p>One thing has to be kept in mind here that <span style="font-size:10pt;color:#0000ff;line-height:115%;font-family:'Courier New';">var</span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"> </span>is definitely <span id="more-16"></span>an implicit type but not the variant type so once a value of a particular type is assigned to a <span style="font-size:10pt;color:#0000ff;line-height:115%;font-family:'Courier New';">var <span style="color:#000000;">type variable, another type of value cant be assigned to it.</span></span></p>
<p><span style="font-size:10pt;color:#0000ff;line-height:115%;font-family:'Courier New';">var <span style="color:#000000;">myVal = 22;<br />
</span><span style="text-decoration:line-through;"><span style="color:#000000;">myVal = &#8220;Panda&#8221;;</span></span></span></p>
<p><span style="color:#000000;"><span style="font-size:x-small;">There are some very significant differences between var and object types. An <span style="color:#0000ff;">object <span style="color:#000000;">type gives you this facility to hold different type of values in the same object that</span> var </span><span style="color:#000000;">doesn&#8217;t as explained above for example in <span style="color:#0000ff;">object</span><span style="font-size:10pt;line-height:115%;"> </span>type you can</span></span></span></p>
<p><span style="font-size:x-small;"><span style="color:#0000ff;">object</span><span style="font-size:10pt;line-height:115%;"> <span style="font-size:10pt;line-height:115%;"><span style="font-size:10pt;line-height:115%;">myObjectTypeVal</span></span> = 32;<br />
</span></span><span style="font-size:x-small;"><span style="font-size:10pt;line-height:115%;"><span style="font-size:10pt;line-height:115%;"><span style="font-size:10pt;line-height:115%;">myObjectTypeVal</span></span> = &#8220;Panda&#8221;</span></span></p>
<p><span style="font-size:x-small;"><span style="font-size:10pt;line-height:115%;">On the other hand you cannot perform mathmatical operators with <span style="color:#0000ff;">object <span style="color:#000000;">type but you can do that with </span>var <span style="color:#000000;">type for the same type of object.</span></span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-size:10pt;line-height:115%;"><span style="color:#0000ff;">object</span><span style="font-size:10pt;line-height:115%;"> <span style="font-size:10pt;line-height:115%;"><span style="font-size:10pt;line-height:115%;">myObjectTypeVal</span></span> = 32;<br />
</span></span></span></p>
<div><span style="font-size:x-small;"><span style="font-size:10pt;line-height:115%;"><span style="font-size:10pt;line-height:115%;"><span style="text-decoration:line-through;">myObjectTypeVal += 32;</span></span></span></span></div>
<div><span style="font-size:x-small;"> </span></div>
<p><span style="font-size:x-small;"> </p>
<p></span></p>
<p> </p>
<p><span style="font-size:x-small;"><span style="font-size:10pt;line-height:115%;"><span style="font-size:10pt;line-height:115%;"><span style="color:#0000ff;font-family:Courier New;">var </span><span style="color:#000000;"><span style="font-family:Courier New;">myVal = 22;<br />
<span style="font-size:10pt;line-height:115%;"><span style="font-size:10pt;line-height:115%;"><span style="color:#000000;"><span style="font-family:Courier New;">myVal += 22;</span></span></span></span></span></span></span></span></span></p>
<p>I hope it helped.</p>
<p>Cheers!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jibrankhan.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jibrankhan.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=16&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/06/12/var-type-and-anonymous-classes-in-c-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple function to reset/clear all child controls in a container</title>
		<link>http://jibrankhan.wordpress.com/2008/06/10/simple-function-to-resetclear-all-child-controls-in-a-container/</link>
		<comments>http://jibrankhan.wordpress.com/2008/06/10/simple-function-to-resetclear-all-child-controls-in-a-container/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 08:35:12 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Controls]]></category>
		<category><![CDATA[Web Programming]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=15</guid>
		<description><![CDATA[Well, I thaught i wasn&#8217;t going to write any javascript this time and lets make a general function which can take any parent control and reset all the sub controls. The functoin can definitely be extended to add more parent and sub controls type but this is just a kick start   
 
public static [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=15&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#0000ff;"><span style="color:#000000;">Well, I thaught i wasn&#8217;t going to write any javascript this time and lets make a general function which can take any parent control and reset all the sub controls. The functoin can definitely be extended to add more parent and sub controls type but this is just a kick start <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"> </p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:#0000ff;">public</span><span style="font-size:10pt;"> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> resetAllControls(<span style="color:#0000ff;">object</span> parent)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>    </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>        </span><span style="color:#0000ff;">if</span> (parent <span style="color:#0000ff;">is</span> <span style="color:#008080;">HtmlTable</span>)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>        </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>            </span><span style="color:#008080;">HtmlTable</span> tbl = (<span style="color:#008080;">HtmlTable</span>)parent;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>            </span><span style="color:#0000ff;">foreach</span> (<span style="color:#008080;">HtmlTableRow</span> row <span style="color:#0000ff;">in</span> tbl.Rows)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>            </span>{<span id="more-15"></span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                </span><span style="color:#0000ff;">foreach</span> (<span style="color:#008080;">HtmlTableCell</span> cell <span style="color:#0000ff;">in</span> row.Cells)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                    </span><span style="color:#0000ff;">foreach</span> (<span style="color:#008080;">Control</span> ctrl <span style="color:#0000ff;">in</span> cell.Controls)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                    </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                        </span><span style="color:#0000ff;">if</span> (ctrl <span style="color:#0000ff;">is</span> <span style="color:#008080;">TextBox</span>)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                        </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                            </span>((<span style="color:#008080;">TextBox</span>)ctrl).Text = <span style="color:#0000ff;">string</span>.Empty;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                            </span>((<span style="color:#008080;">TextBox</span>)ctrl).Enabled = <span style="color:#0000ff;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                            </span>((<span style="color:#008080;">TextBox</span>)ctrl).Visible = <span style="color:#0000ff;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                        </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                        </span><span style="color:#0000ff;">if</span> (ctrl <span style="color:#0000ff;">is</span> <span style="color:#008080;">CheckBox</span>)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                        </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                            </span>((<span style="color:#008080;">CheckBox</span>)ctrl).Checked = <span style="color:#0000ff;">false</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                            </span>((<span style="color:#008080;">CheckBox</span>)ctrl).Enabled = <span style="color:#0000ff;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                            </span>((<span style="color:#008080;">CheckBox</span>)ctrl).Visible = <span style="color:#0000ff;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                        </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                        </span><span style="color:#0000ff;">if</span> (ctrl <span style="color:#0000ff;">is</span> <span style="color:#008080;">DropDownList</span>)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                        </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                            </span>((<span style="color:#008080;">DropDownList</span>)ctrl).SelectedIndex = 0;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                            </span>((<span style="color:#008080;">DropDownList</span>)ctrl).Enabled = <span style="color:#0000ff;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                            </span>((<span style="color:#008080;">DropDownList</span>)ctrl).Visible = <span style="color:#0000ff;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                        </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                    </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>                </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>            </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;"><span>    </span>}</span></p>
<p>it is very useful to be used inside update panel.</p>
<p>Cheers! </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jibrankhan.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jibrankhan.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=15&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/06/10/simple-function-to-resetclear-all-child-controls-in-a-container/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>
	</item>
		<item>
		<title>Dabatase publishing with SQL SERVER 2005 Express Edition</title>
		<link>http://jibrankhan.wordpress.com/2008/06/09/dabatase-publishing-with-sql-server-2005-express-edition/</link>
		<comments>http://jibrankhan.wordpress.com/2008/06/09/dabatase-publishing-with-sql-server-2005-express-edition/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 17:04:04 +0000</pubDate>
		<dc:creator>jibrankhan</dc:creator>
				<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MS SQL]]></category>
		<category><![CDATA[Publishing]]></category>

		<guid isPermaLink="false">http://jibrankhan.wordpress.com/?p=10</guid>
		<description><![CDATA[Yeah, I was looking for the easiest way to publish my database entirely with schema plus data to my online server. Here is a handy tool to install and use with excellent GUI.
Download the database publishing wizard 1.1 here.
 
It is so easy that I guess i dont have to write any tutorial/steps to use it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=10&subd=jibrankhan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yeah, I was looking for the easiest way to publish my database entirely with schema plus data to my online server. Here is a handy tool to install and use with excellent GUI.</p>
<p><a class="alignleft" title="Database Publishing Wizar 1.1 Download" href="http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&amp;displaylang=en" target="_blank">Download the database publishing wizard 1.1 here.</a></p>
<p> </p>
<p>It is so easy that I guess i dont have to write any tutorial/steps to use it but yet some screenshots might be useful for newbies <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<a href='http://jibrankhan.wordpress.com/2008/06/09/dabatase-publishing-with-sql-server-2005-express-edition/step1/' title='step1'><img width="150" height="135" src="http://jibrankhan.files.wordpress.com/2008/06/step1.gif?w=150&#038;h=135" class="attachment-thumbnail" alt="" title="step1" /></a>
<a href='http://jibrankhan.wordpress.com/2008/06/09/dabatase-publishing-with-sql-server-2005-express-edition/step-3/' title='step-3'><img width="150" height="135" src="http://jibrankhan.files.wordpress.com/2008/06/step-3.gif?w=150&#038;h=135" class="attachment-thumbnail" alt="" title="step-3" /></a>
<a href='http://jibrankhan.wordpress.com/2008/06/09/dabatase-publishing-with-sql-server-2005-express-edition/step-2/' title='step-2'><img width="150" height="135" src="http://jibrankhan.files.wordpress.com/2008/06/step-2.gif?w=150&#038;h=135" class="attachment-thumbnail" alt="" title="step-2" /></a>

<p>Cheers -</p>
<p> </p>
<hr /><a title="web design and development company" href="http://www.2stepssolutions.com" target="_blank">2 Steps Solutions</a> <br />
Re-engineering your business</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jibrankhan.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jibrankhan.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jibrankhan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jibrankhan.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jibrankhan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jibrankhan.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jibrankhan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jibrankhan.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jibrankhan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jibrankhan.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jibrankhan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jibrankhan.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jibrankhan.wordpress.com&blog=3932601&post=10&subd=jibrankhan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jibrankhan.wordpress.com/2008/06/09/dabatase-publishing-with-sql-server-2005-express-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/037564edd4ed099abb20e6ce012bb7c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jibz</media:title>
		</media:content>
	</item>
	</channel>
</rss>