<?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>Harpreet's Blog</title>
	<atom:link href="http://hsvirk.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hsvirk.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sat, 15 Dec 2007 18:24:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hsvirk.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Harpreet's Blog</title>
		<link>http://hsvirk.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hsvirk.wordpress.com/osd.xml" title="Harpreet&#039;s Blog" />
	<atom:link rel='hub' href='http://hsvirk.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Installing SQL SERVER 2005 and SQL REPORTING SERVICES</title>
		<link>http://hsvirk.wordpress.com/2007/12/15/installing-sql-server-2005-and-sql-reporting-services/</link>
		<comments>http://hsvirk.wordpress.com/2007/12/15/installing-sql-server-2005-and-sql-reporting-services/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 01:38:38 +0000</pubDate>
		<dc:creator>hsvirk</dc:creator>
				<category><![CDATA[Sql Reporting Server]]></category>
		<category><![CDATA[SQL SERVER]]></category>
		<category><![CDATA[Sql Server 2005]]></category>
		<category><![CDATA[SqlReporting]]></category>
		<category><![CDATA[sqlserver]]></category>

		<guid isPermaLink="false">http://hsvirk.wordpress.com/2007/12/15/installing-sql-server-2005-and-sql-reporting-services/</guid>
		<description><![CDATA[Installing SQL SERVER 2005 and Installing SQL REPORTING SERVICES: 1.       First we need to create service account for Sql Server and Reporting Services. Lets create a service account named SqlReportServer. A.      Start  &#8211;&#62; Settings &#8211;&#62; Control Panel &#8211;&#62; Administrative Tools B.      Click Computer Management C.      Expand the Local Users And Groups D.      Right-click the Users folder [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=11&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">Installing SQL SERVER 2005 and Installing SQL REPORTING SERVICES:</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpFirst"><span><span><font face="Calibri">1.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">First we need to create service account for Sql Server and Reporting Services. Lets create a service account named <strong>SqlReportServer.</strong> </font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">A.</font><span style="font:7pt 'Times New Roman';">      </span></span></span><font face="Calibri">Start<span>  </span>&#8211;&gt; Settings &#8211;&gt; Control Panel &#8211;&gt; Administrative Tools</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">B.</font><span style="font:7pt 'Times New Roman';">      </span></span></span><font face="Calibri">Click Computer Management</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">C.</font><span style="font:7pt 'Times New Roman';">      </span></span></span><font face="Calibri">Expand the Local Users And Groups</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">D.</font><span style="font:7pt 'Times New Roman';">      </span></span></span><font face="Calibri">Right-click the Users folder and select New User.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">E.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Enter a User name – <strong>SqlReportServer</strong></font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">F.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Enter description &#8211; Account for SQL Server and Reporting Services.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">G.</font><span style="font:7pt 'Times New Roman';">     </span></span></span><font face="Calibri">Enter Password.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">H.</font><span style="font:7pt 'Times New Roman';">      </span></span></span><font face="Calibri">Enter Confirm password.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">I.</font><span style="font:7pt 'Times New Roman';">        </span></span></span><font face="Calibri">Uncheck “User must change password at next logon” check box.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">J.</font><span style="font:7pt 'Times New Roman';">        </span></span></span><font face="Calibri">Select “User cannot change password” check box.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">K.</font><span style="font:7pt 'Times New Roman';">      </span></span></span><font face="Calibri">Select “Password never expires” check box.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.75in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">L.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Click “Create” button.<br />
</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">2.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Now we will install SQL SERVER 2005 and SQL REPORTING SERVICES. For this first insert SQL SERVER CD wait for auto run to open.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">3.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Under install click “Server components, tools, Books Online, and samples”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">4.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">You will then asked to accept “End User License Agreement”, Click check box “I accept the licensing terms and conditions.” and then click “Next”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">5.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">It will then ask you to install prerequisites and then click “Install”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">6.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">It will install prerequisites and then click next.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">7.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Screen will show that system is inspecting configuration. Click<span>  </span>“Next”</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">8.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">It will show SQL SERVER INSTALIZARD click “Next”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">9.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Another in-depth configuration screen will appear and if there is any error you need to repair otherwise click “Next”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">10.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">Next on the Registration Information page, type a Name and, optionally, a Company name, and then click next.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">11.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">Now on this screen we will need to select components we want to install.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">12.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">Click the check box next to SQL Server Database Services†, Analysis Services†, Reporting Services† and then click the check box next to Workstation Components, Books Online And Development Tools. († in future tutorials we will learn SQL DBA Tips and Reporting Services and Analysis services so we install it together)</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">13.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">Click Advanced</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">14.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">Click next to Documentation, Samples, And Sample Databases, click the arrow next to Sample Databases, and select Entire Feature Will Be Installed on Local Hard Drive. Click the arrow next to Sample Code and Applications, and select Entire Feature Will Be Installed on Local Hard Drive. Now click “Next”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">15.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">On the Instance Name screen select “Default Instance” and click “Next”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">16.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">On the Service Account screen, click “Use a domain user account” and enter account information we have created in step 1(account name <strong>SqlReportServer</strong> ) when finished click “Next”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">17.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">On the Authentication Mode screen select “Mixed Mode” enter a password for sa account and then click “Next”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">18.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">On next screen select “Latin1_General” collation designator and sort order.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">19.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">On the Report Server Installation Options screen select “Install but do not configure the server” click “Next”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">20.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">On the Error and Usage Report Settings page, you can choose to send reports to Microsoft. Click “Next”,</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">21.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri"><span> </span>Now it will show you the list of components will be installed then click “Install”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">22.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">Now Setup progress screen appears during install. <span> </span>Once setup finished for all components click “Next”.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">23.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">You can review Summary log for any setup issue on completing sql server setup screen.<span>  </span>Click “Finish” to complete installation.</font></p>
<p><span><span><font face="Calibri">      24.</font><span style="font:7pt 'Times New Roman';">   </span></span></span><font face="Calibri">Reboot your system if required.<br />
            </font><font face="Calibri">Once you finish installation install “SQL Server 2005 Service Pack 2”.<br />
<span style="font-size:11pt;line-height:115%;font-family:'Calibri','sans-serif';">                <a href="http://technet.microsoft.com/en-us/sqlserver/bb426877.aspx">http://technet.microsoft.com/en-us/sqlserver/bb426877.aspx</a></span><br />
             For more reading please check:<br />
             <a href="http://support.microsoft.com/kb/934164">http://support.microsoft.com/kb/934164</a>(How to install SQL Server 2005 Reporting Services on a Windows Vista)</font><font face="Calibri"></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpFirst"><span style="color:#002060;"><span><br />
-<span style="font:7pt 'Times New Roman';">          </span></span></span><strong><span style="color:#002060;">Harpreet Virk</span></strong></p>
<p style="margin:0 0 10pt 0.5in;" class="MsoListParagraphCxSpLast">(Pilibangan)</p>
<p></font></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hsvirk.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hsvirk.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hsvirk.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hsvirk.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hsvirk.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hsvirk.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hsvirk.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hsvirk.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hsvirk.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hsvirk.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hsvirk.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hsvirk.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hsvirk.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hsvirk.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hsvirk.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hsvirk.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=11&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hsvirk.wordpress.com/2007/12/15/installing-sql-server-2005-and-sql-reporting-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48c5825805a98640563e7e6c0c0dd0c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Harpreet</media:title>
		</media:content>
	</item>
		<item>
		<title>Turning Off Client-Side Validation</title>
		<link>http://hsvirk.wordpress.com/2007/12/08/turning-off-client-side-validation/</link>
		<comments>http://hsvirk.wordpress.com/2007/12/08/turning-off-client-side-validation/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 16:48:27 +0000</pubDate>
		<dc:creator>hsvirk</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://hsvirk.wordpress.com/2007/12/08/turning-off-client-side-validation/</guid>
		<description><![CDATA[Each of the validation server controls has a property called EnableClientScript. This property is set to True by default, but setting it to False prevents the control from sending out a JavaScript function for validation on the client. 1.       Disabling client-side validations in a validation control &#60;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&#62; &#60;div&#62; &#60;asp:TextBox ID=&#8221;txtName&#8221; runat=&#8221;server&#8221;&#62;&#60;/asp:TextBox&#62; &#60;asp:RequiredFieldValidator ID=&#8221;RequiredFieldValidator1&#8243; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=10&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin:0 0 10pt;" class="MsoNormal"><span style="font-size:10pt;line-height:115%;"></span></p>
<p><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><br />
Each of the validation server controls has a property called EnableClientScript. This property is set to True by default, but setting it to False prevents the control from sending out a JavaScript function for validation on the client.<span style="font-size:10pt;line-height:115%;"><font face="Calibri"> </font></span></font></span><span style="font-size:10pt;line-height:115%;"></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><br />
<span style="font-size:10pt;line-height:115%;"><font face="Calibri"><br />
</font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri">1.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri">Disabling client-side validations in a validation control</font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"> </span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></p>
<p></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></p>
<p><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';">&lt;<span style="font-size:10pt;color:#a31515;font-family:'Courier New';">form</span><span style="font-size:10pt;font-family:'Courier New';"> <span style="color:red;">id</span><span style="color:blue;">=&#8221;form1&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;<br />
</span></span><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;color:blue;font-family:'Courier New';">&gt;<br />
</span><span style="font-size:10pt;color:blue;font-family:'Courier New';">&lt;</span><span style="font-size:10pt;color:#a31515;font-family:'Courier New';">asp</span><span style="font-size:10pt;color:blue;font-family:'Courier New';">:</span><span style="font-size:10pt;color:#a31515;font-family:'Courier New';">TextBox</span><span style="font-size:10pt;font-family:'Courier New';"> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;txtName&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">TextBox</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:10pt;color:blue;font-family:'Courier New';">&lt;</span><span style="font-size:10pt;color:#a31515;font-family:'Courier New';">asp</span><span style="font-size:10pt;color:blue;font-family:'Courier New';">:</span><span style="font-size:10pt;color:#a31515;font-family:'Courier New';">RequiredFieldValidator</span><span style="font-size:10pt;font-family:'Courier New';"> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;RequiredFieldValidator1&#8243;</span> <span style="color:red;">Runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">ErrorMessage</span><span style="color:blue;">=&#8221;Required!!!&#8221;</span> <span style="color:red;">ControlToValidate</span><span style="color:blue;">=&#8221;txtName&#8221;</span> <span style="color:red;">EnableClientScript</span><span style="color:blue;">=&#8221;false&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">RequiredFieldValidator</span><span style="color:blue;">&gt;<br />
</span></span><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;color:blue;font-family:'Courier New';">&gt;</span><span style="font-size:10pt;font-family:'Courier New';"><span>   <br />
</span></span><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';">&lt;/</span><span style="font-size:10pt;color:#a31515;line-height:115%;font-family:'Courier New';">form</span><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';">&gt;</span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></p>
<p><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><font color="#000000"><span style="font-size:10pt;line-height:115%;"><span></span></span></font></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><font color="#000000"><span style="font-size:10pt;line-height:115%;"><span>2.<span style="font:7pt 'Times New Roman';">       </span><span style="font-size:10pt;line-height:115%;">Reamove client-side capability programmatically</span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><br />
</span></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><font color="#000000"><span style="font-size:10pt;line-height:115%;"><span></span></span></font></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><br />
</span></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></p>
<p></span></span></font></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';">protected<span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><font color="#000000"> </font><span style="color:blue;">void</span><font color="#000000"> Page_Load(</font><span style="color:blue;">object</span><font color="#000000"> sender, </font><span style="color:#2b91af;">EventArgs</span><font color="#000000"> e)</font></span><span style="font-size:10pt;line-height:115%;"><br />
</span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><font color="#000000">{</font></span><span style="font-size:10pt;line-height:115%;"><br />
</span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><font color="#000000"><span> </span>RequiredFieldValidator1.EnableClientScript = </font><span style="color:blue;">false</span><font color="#000000">;</font></span><span style="font-size:10pt;line-height:115%;"><br />
</span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><font color="#000000">}</font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span></span></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"> </font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><span><br />
</span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;line-height:115%;"><font size="+0"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><br />
<span style="font-size:10pt;line-height:115%;"><font face="Calibri"><font color="#000000"><span style="font-size:10pt;line-height:115%;"><span><span style="font:7pt 'Times New Roman';"></p>
<p>3.    </span></span></span><span style="font-size:10pt;line-height:115%;">Disable client-side script capabilities for all the validation controls on a page from within the Page_Load event.</span></font></font></span></font></span></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><br />
 </span></font></span></font></span></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"></span></font></span></font></span></font></span></span></font></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></p>
<p><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><span><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;line-height:115%;"><font face="Calibri"><span style="font-size:10pt;color:blue;font-family:'Courier New';"></p>
<p style="line-height:normal;margin:0;" class="MsoNormal"><span style="font-size:10pt;color:blue;font-family:'Courier New';"><br />
protected</span><span style="font-size:10pt;font-family:'Courier New';"><font color="#000000"> </font><span style="color:blue;">void</span><font color="#000000"> Page_Load(</font><span style="color:#2b91af;">Object</span><font color="#000000"> sender, </font><span style="color:#2b91af;">EventArgs</span><font color="#000000"> e)<br />
</font></span><span style="font-size:10pt;font-family:'Courier New';"><font color="#000000">{<br />
</font></span><span style="font-size:10pt;color:blue;font-family:'Courier New';">foreach</span><span style="font-size:10pt;font-family:'Courier New';"><font color="#000000"> (</font><span style="color:#2b91af;">BaseValidator</span><font color="#000000"> bv </font><span style="color:blue;">in</span><font color="#000000"> Page.Validators)<br />
</font></span><span style="font-size:10pt;font-family:'Courier New';"><font color="#000000">{<br />
</font></span><span style="font-size:10pt;font-family:'Courier New';"><font color="#000000"><span> </span>bv.EnableClientScript = </font><span style="color:blue;">false</span><font color="#000000">;<br />
</font></span><span style="font-size:10pt;font-family:'Courier New';"><font color="#000000">}<br />
</font></span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><font color="#000000">}</font></span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="color:blue;font-family:'Calibri','sans-serif';"><br />
</span></span></p>
<p><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="color:blue;font-family:'Calibri','sans-serif';"></span></span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="color:blue;font-family:'Calibri','sans-serif';"></span></span></p>
<p><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><span style="color:blue;font-family:'Calibri','sans-serif';">-<span style="font-size:7pt;color:blue;"><font face="Times New Roman">          </font></span><strong><span style="color:blue;font-family:'Calibri','sans-serif';">Harpreet Virk</span></strong><span style="font-family:'Calibri','sans-serif';"> <br />
<span>        </span>Pilibangan </span><span></span></span></span></p>
<p></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></font></span></font></span></font></span></font></span></span></font></span></font></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hsvirk.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hsvirk.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hsvirk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hsvirk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hsvirk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hsvirk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hsvirk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hsvirk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hsvirk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hsvirk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hsvirk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hsvirk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hsvirk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hsvirk.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hsvirk.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hsvirk.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=10&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hsvirk.wordpress.com/2007/12/08/turning-off-client-side-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48c5825805a98640563e7e6c0c0dd0c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Harpreet</media:title>
		</media:content>
	</item>
		<item>
		<title>Insert  (inject) client script into page in ASP.NET 2.0</title>
		<link>http://hsvirk.wordpress.com/2007/11/28/insert-inject-client-script-into-page-in-aspnet-20/</link>
		<comments>http://hsvirk.wordpress.com/2007/11/28/insert-inject-client-script-into-page-in-aspnet-20/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 01:44:50 +0000</pubDate>
		<dc:creator>hsvirk</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://hsvirk.wordpress.com/2007/11/28/insert-inject-client-script-into-page-in-aspnet-20/</guid>
		<description><![CDATA[Insert  (add) javaScript to code behind page as RegisterClientScriptBlock in ASP.NET 2.0 Some time we need to implement client-side functionality to page. To add that client-side functionality to page we need to add (insert) JavaScript (client-side script) into page. For example if some user is ideal for certain time of period we should pop-up an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=9&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">Insert <span> </span>(add) javaScript to code behind page as </font><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">RegisterClientScriptBlock </span><font face="Calibri">in ASP.NET 2.0</font></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">Some time we need to implement client-side functionality to page. To add that client-side functionality to page we need to add (insert) JavaScript (client-side script) into page.</font></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">For example if some user is ideal for certain time of period we should pop-up an alert window asking if user would like to continue.</font></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">You can insert strings of client side script into application or in some cases you can have separate file (include file). We will discuss both scenarios in our example.</font></p>
<p><font face="Calibri">The parameters of </font><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">RegisterClientScriptBlock are:</span></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpFirst"><span><span><font face="Calibri">1.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Type: The type of calling page.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">2.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Key: The key to identify the script.</font></p>
<p style="text-indent:-0.25in;margin:0 0 0 0.5in;" class="MsoListParagraphCxSpMiddle"><span><span><font face="Calibri">3.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">Script: Content of the script to be sent to the client side. </font></p>
<p style="text-indent:-0.25in;margin:0 0 10pt 0.5in;" class="MsoListParagraphCxSpLast"><span><span><font face="Calibri">4.</font><span style="font:7pt 'Times New Roman';">       </span></span></span><font face="Calibri">AddScript: Indicate whether the script should be enclosed within a &lt;script&gt; bloc.</font></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">Main.aspx -</font></p>
<p><span style="font-size:9pt;color:blue;font-family:'Courier New';">&lt;</span><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">body</span><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;</span><span style="font-size:9pt;font-family:'Courier New';"><span>   <br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">form</span> <span style="color:red;">id</span><span style="color:blue;">=&#8221;form1&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;<br />
</span></span><span style="font-size:9pt;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><span style="font-size:9pt;font-family:'Courier New';"><span>       <br />
       </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Button</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;Button1&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">OnClick</span><span style="color:blue;">=&#8221;Button1_Click&#8221;</span> <span style="color:red;">Text</span><span style="color:blue;">=&#8221;Call Client Script&#8221;</span> <span style="color:blue;">/&gt;<br />
    &lt;/</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;</span></span><span style="font-size:9pt;font-family:'Courier New';"><span>   <br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;/</span><span style="color:#a31515;">form</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;color:blue;line-height:115%;font-family:'Courier New';">&lt;/</span><span style="font-size:9pt;color:#a31515;line-height:115%;font-family:'Courier New';">body</span><span style="font-size:9pt;color:blue;line-height:115%;font-family:'Courier New';">&gt;</span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">Main.aspx.cs</font></p>
<p><span style="font-size:9pt;color:blue;font-family:'Courier New';">public</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:blue;">partial</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">Main</span>: System.Web.UI.<span style="color:#2b91af;">Page<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';">{<br />
</span><span style="font-size:9pt;color:blue;font-family:'Courier New';">protected</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:blue;">void</span> Page_Load(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">EventArgs</span> e)<br />
</span><span style="font-size:9pt;font-family:'Courier New';">{</span><span style="font-size:9pt;font-family:'Courier New';"><span>  <br />
</span><span style="color:blue;">if</span> (!Page.IsPostBack)</span><span style="font-size:9pt;font-family:'Courier New';"><span>    <br />
</span>{</span><span style="font-size:9pt;font-family:'Courier New';"><span>      </span><span> <br />
</span><span style="color:blue;">string</span> script = <span style="color:#a31515;">&#8220;&lt;script&gt; alert(&#8216;current date and time is: &#8220;</span> + <span style="color:#2b91af;">DateTime</span>.Now + <span style="color:#a31515;">&#8220;&#8216;)&lt;/script&gt;&#8221;</span>;</span><span style="font-size:9pt;font-family:'Courier New';"><span>       </span><span style="color:blue;">this</span>.Page.ClientScript.<strong><em>Register</em></strong></span><strong><em><span style="font-size:10pt;font-family:'Courier New';">ClientScriptBloc</span></em></strong><strong><em><span style="font-size:9pt;font-family:'Courier New';">k</span></em></strong><span style="font-size:9pt;font-family:'Courier New';">(<span style="color:blue;">typeof</span>(<span style="color:#2b91af;">Page</span>), <span style="color:#a31515;">&#8220;MyKey&#8221;</span>, script);</span><span style="font-size:9pt;font-family:'Courier New';"><span>     <br />
</span>}</span><span style="font-size:9pt;font-family:'Courier New';"><span>  <br />
</span></span><span style="font-size:9pt;font-family:'Courier New';">}<br />
</span><span style="font-size:9pt;color:green;font-family:'Courier New';">// using external client-side file</span><span style="font-size:9pt;font-family:'Courier New';"> </span><span style="font-size:9pt;font-family:'Courier New';"><span> <br />
</span><span style="color:blue;">protected</span> <span style="color:blue;">void</span> Button1_Click(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">EventArgs</span> e)</span><span style="font-size:9pt;font-family:'Courier New';"><span>  </span><span> <br />
</span>{</span><span style="font-size:9pt;font-family:'Courier New';"><span>    <br />
</span><span style="color:blue;">string</span> scriptUrl = <span style="color:#a31515;">&#8220;include.js&#8221;</span>;<br />
</span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">this</span>.Page.ClientScript.<strong><em>Register</em></strong></span><strong><em><span style="font-size:10pt;font-family:'Courier New';">ClientScriptInclude</span></em></strong><span style="font-size:9pt;font-family:'Courier New';">(<span style="color:blue;">typeof</span>(<span style="color:#2b91af;">Page</span>), <span style="color:#a31515;">&#8220;MyKey&#8221;</span>, scriptUrl);<br />
</span><span style="font-size:9pt;font-family:'Courier New';">}<br />
</span><span style="font-size:9pt;line-height:115%;font-family:'Courier New';">}</span></p>
<p><span style="font-size:9pt;line-height:115%;font-family:'Courier New';"></span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"><strong>Include.js</strong><br />
</span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">alert(<span style="color:#a31515;">&#8220;Hello from Javascript&#8221;</span>);</span></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">When converting from .net 1.1 to 2.0 you get following warning:</font></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">&#8216;System.Web.UI.Page.RegisterClientScriptBlock(string, string)&#8217; is obsolete: &#8216;The recommended alternative is ClientScript.RegisterClientScriptBlock(Type type, string key, string script). </font><a href="http://go.microsoft.com/fwlink/?linkid=14202"><font color="#0000ff" face="Calibri">http://go.microsoft.com/fwlink/?linkid=14202</font></a><font face="Calibri">&#8216;</font></p>
<p style="margin:0 0 10pt;" class="MsoNormal"><font face="Calibri">To resolve this issue use</font></p>
<p><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">Page.ClientScript.RegisterClient</span><span style="font-family:'Courier New';">ScriptBlock</span><span style="font-size:10pt;line-height:115%;font-family:'Courier New';">(<span style="color:blue;">typeof</span>(<span style="color:#2b91af;">Page</span>), <span style="color:#a31515;">&#8220;MyKey&#8221;</span>, script);</span></p>
<p><span style="font-size:10pt;line-height:115%;font-family:'Courier New';"></span><span style="font-size:12pt;color:blue;line-height:115%;"><span><font face="Calibri">-</font><span style="font:7pt 'Times New Roman';">          </span></span></span><strong><span style="font-size:12pt;color:blue;line-height:115%;"><font face="Calibri">Harpreet Virk</font></span></strong><font face="Calibri"> </font></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hsvirk.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hsvirk.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hsvirk.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hsvirk.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hsvirk.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hsvirk.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hsvirk.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hsvirk.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hsvirk.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hsvirk.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hsvirk.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hsvirk.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hsvirk.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hsvirk.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hsvirk.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hsvirk.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=9&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hsvirk.wordpress.com/2007/11/28/insert-inject-client-script-into-page-in-aspnet-20/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48c5825805a98640563e7e6c0c0dd0c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Harpreet</media:title>
		</media:content>
	</item>
		<item>
		<title>Working with Array in ASP.NET (C#)</title>
		<link>http://hsvirk.wordpress.com/2007/11/10/working-with-array-in-aspnet-c/</link>
		<comments>http://hsvirk.wordpress.com/2007/11/10/working-with-array-in-aspnet-c/#comments</comments>
		<pubDate>Sat, 10 Nov 2007 04:11:34 +0000</pubDate>
		<dc:creator>hsvirk</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://hsvirk.wordpress.com/2007/11/10/working-with-array-in-aspnet-c/</guid>
		<description><![CDATA[Today we will discuss about One-Dimensional Arrays and and how we can use arrays with ASP.NET.  Arrays are basically lists of sequentially accessible data. They provide a means of accessing and storing data in a way that allows multiple related elements to be manipulated via numeric index. SampleArray.aspx &#60;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&#62; &#60;div&#62; &#60;asp:Label ID=&#8221;Label1&#8243; runat=&#8221;server&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=8&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';">Today we will discuss about One-Dimensional Arrays and and how we can use arrays with ASP.NET.  Arrays are basically lists of sequentially accessible data. They provide a means of accessing and storing data in a way that allows multiple related elements to be manipulated via numeric index.</span></span></p>
<p><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"></span></span><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">SampleArray.aspx<br />
</span></span></span></span></span></span></span><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"></span></span><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;"></span></span></span></span></span><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;"><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;"></span></span></span><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;"><br />
&lt;<span style="color:#a31515;">form</span><span style="color:black;"> </span><span style="color:red;">id</span><span style="color:blue;">=&#8221;form1&#8243;</span><span style="color:black;"> </span><span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;</span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">div</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">Label</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">ID</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;Label1&#8243; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">runat</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;server&#8221; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">Width</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;306px&#8221;&gt;&lt;/</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">Label</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">br</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> /&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">DropDownList</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">ID</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;DropDownList1&#8243; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">runat</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;server&#8221; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">Width</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;306px&#8221;&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;/</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">DropDownList</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">br</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> /&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">DropDownList</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">ID</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;DropDownList2&#8243; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">runat</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;server&#8221; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">Width</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;306px&#8221;&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;/</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">DropDownList</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';"> </span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">br</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> /&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">Label</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">ID</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;Label2&#8243; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">runat</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;server&#8221; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">Width</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;306px&#8221;&gt;&lt;/</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">Label</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">br</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> /&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">DropDownList</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">ID</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;DropDownList3&#8243; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">runat</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;server&#8221; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">Width</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;306px&#8221;&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;/</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">DropDownList</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">br</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> /&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">Label</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">ID</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;Label3&#8243; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">runat</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;server&#8221; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">Width</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;306px&#8221;&gt;&lt;/</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">Label</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">br</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> /&gt;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">&lt;</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">Label</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">ID</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;Label4&#8243; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">runat</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;server&#8221; </span></span><span class="docemphasis"><span style="font-size:9pt;color:red;font-family:'Courier New';">Width</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">=&#8221;306px&#8221;&gt;&lt;/</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">asp</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">:</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">Label</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;&lt;/</span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">div</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">&gt;<span class="docemphasis"><span style="font-size:9pt;color:blue;line-height:115%;font-family:'Courier New';">&lt;/</span><span style="font-size:9pt;color:#a31515;line-height:115%;font-family:'Courier New';">form</span><span style="font-size:9pt;color:blue;line-height:115%;font-family:'Courier New';">&gt;</span></span></span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';"><font color="#0000ff"><br />
</font></span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> </span></span></span></span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">SampleArray.aspx.cs<br />
</span></span></span></span></span></span></span></span></span></span></span><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"></span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><br />
namespace WebApplication1<br />
<span class="docemphasis">{</span><br />
<span class="docemphasis">public partial class </span><span class="docemphasis"><span style="font-size:9pt;color:#2b91af;font-family:'Courier New';">SampleArray</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> : System.Web.UI.</span></span><span class="docemphasis"><span style="font-size:9pt;color:#2b91af;font-family:'Courier New';">Page</span></span><span style="font-size:9pt;color:#2b91af;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">{</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:green;font-family:'Courier New';">//Declaring and Initializing Arrays</span></span><span style="font-size:9pt;color:green;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">static private string[] names = new string[6] { </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;Paul&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">, </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;Harpreet&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">, </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;John&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">, </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;Andy&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">, </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;Jeff&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">, </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;Mike&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> };</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">static private string[] productNames = { </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;Blue Shirt&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">, </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;Red Shirt&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">, </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;Blue Pent&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">, </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;Red Pent&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> };<br />
</span></span></span></span></span></span></span></span><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">protected void Page_Load(object sender, <span class="docemphasis"><span style="font-size:9pt;color:#2b91af;font-family:'Courier New';">EventArgs</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> e)</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">{<br />
foreach (string name in names)</span><br />
<span class="docemphasis">{</span><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:green;font-family:'Courier New';">//Show array items on lable</span></span><span style="font-size:9pt;color:green;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">Label1.Text += (name) + </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;&lt;br&gt;&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:green;font-family:'Courier New';">//populate Dropdownlist with array</span></span><span style="font-size:9pt;color:green;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">DropDownList1.Items.Add(name);</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">}<br />
</span></span><span class="docemphasis"><span style="font-size:9pt;color:green;font-family:'Courier New';">//Sort array reversely</span></span><span style="font-size:9pt;color:green;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:#2b91af;font-family:'Courier New';">Array</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">.Reverse(names);</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">foreach (string strReverseArray in names)</span><br />
<span class="docemphasis">{</span><br />
<span class="docemphasis">DropDownList2.Items.Add(strReverseArray);</span><br />
<span class="docemphasis">}<br />
</span></span><span class="docemphasis"><span style="font-size:9pt;color:green;font-family:'Courier New';">// Find array element by array index</span></span><span style="font-size:9pt;color:green;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">Label2.Text = names.GetValue(3).ToString();<br />
</span></span><span class="docemphasis"><span style="font-size:9pt;color:green;font-family:'Courier New';">//Sort the array</span></span><span style="font-size:9pt;color:green;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:#2b91af;font-family:'Courier New';">Array</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">.Sort(names);</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">foreach (string strSort in names)</span><br />
<span class="docemphasis">{</span><br />
<span class="docemphasis">DropDownList3.Items.Add(strSort);</span><br />
<span class="docemphasis">}<br />
</span></span><span class="docemphasis"><span style="font-size:9pt;color:green;font-family:'Courier New';">//Pass array as a parameter</span></span><span style="font-size:9pt;color:green;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">showNames(names);<br />
</span></span><span class="docemphasis"><span style="font-size:9pt;color:green;font-family:'Courier New';">//use FindAll to search element</span></span><span style="font-size:9pt;color:green;font-family:'Courier New';"><br />
</span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">string[] blueProducts = </span></span><span class="docemphasis"><span style="font-size:9pt;color:#2b91af;font-family:'Courier New';">Array</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">.FindAll(productNames, IsBlueProduct);</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">foreach (string product in blueProducts)</span><br />
<span class="docemphasis">{</span><br />
<span class="docemphasis">Label4.Text += (product) + </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;&lt;br&gt;&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">}</span><br />
<span class="docemphasis">}<br />
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"></span></span></span></span></span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"></span></span></span></span></span></span></span></span></span></span></span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"> </span></span></span></span></span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis">private void showNames(string[] names)<br />
<span class="docemphasis">{</span><br />
<span class="docemphasis">int counter = 1;</span><br />
<span class="docemphasis">foreach (string personName in names)</span><br />
<span class="docemphasis">{</span><br />
<span class="docemphasis">Label3.Text += counter+</span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;. &#8220;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">+ (personName) + </span></span><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;&lt;br&gt;&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">;</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">}</span><br />
<span class="docemphasis">counter++;</span><br />
<span class="docemphasis">}<br />
</span></span></span></span></span></span></span></span></span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis">static bool IsBlueProduct(string productName)<br />
<span class="docemphasis">{</span><br />
<span class="docemphasis">if (productName.ToUpper().Contains(</span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">&#8220;BLUE&#8221;</span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">))</span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><br />
<span class="docemphasis">return true;</span><br />
<span class="docemphasis">else</span><br />
<span class="docemphasis">return false;</span><br />
<span class="docemphasis">}</span><br />
<span class="docemphasis">}</span><br />
<span class="docemphasis">}<br />
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span class="docemphasis"></span></span><span class="docemphasis"><span style="font-size:9pt;font-family:'Courier New';"></span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span>-<span style="font:7pt 'Times New Roman';">    </span></span></span></span><span class="docemphasis"><span style="font-size:9pt;color:blue;font-family:'Courier New';">Harpreet Virk</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hsvirk.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hsvirk.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hsvirk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hsvirk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hsvirk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hsvirk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hsvirk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hsvirk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hsvirk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hsvirk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hsvirk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hsvirk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hsvirk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hsvirk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hsvirk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hsvirk.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=8&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hsvirk.wordpress.com/2007/11/10/working-with-array-in-aspnet-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48c5825805a98640563e7e6c0c0dd0c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Harpreet</media:title>
		</media:content>
	</item>
		<item>
		<title>How to access control&#8217;s value to another page (Pass Values between Web Pages in ASP.NET 2.0)</title>
		<link>http://hsvirk.wordpress.com/2007/10/30/how-to-access-controls-value-to-another-page-pass-values-between-web-pages-in-aspnet-20/</link>
		<comments>http://hsvirk.wordpress.com/2007/10/30/how-to-access-controls-value-to-another-page-pass-values-between-web-pages-in-aspnet-20/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 21:46:02 +0000</pubDate>
		<dc:creator>hsvirk</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hsvirk.wordpress.com/2007/10/30/how-to-access-controls-value-to-another-page-pass-values-between-web-pages-in-aspnet-20/</guid>
		<description><![CDATA[PostBack to another page in ASP.net 2.0 You can use PostBackUrl attribute of Button control of source page to post to another page.  FirstPage.aspx: &#60;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&#62;     &#60;div&#62; &#60;asp:Label ID=&#8221;Label1&#8243; runat=&#8221;server&#8221; Text=&#8221;First Page&#8221; Width=&#8221;305px&#8221; ForeColor=&#8221;Navy&#8221;&#62;&#60;/asp:Label&#62; &#60;br /&#62;&#60;br /&#62; &#60;asp:Label ID=&#8221;Label2&#8243; runat=&#8221;server&#8221; Text=&#8221;First Name&#8221; Width=&#8221;149px&#8221;&#62;&#60;/asp:Label&#62; &#60;asp:TextBox ID=&#8221;txtFirstName&#8221; runat=&#8221;server&#8221;&#62;&#60;/asp:TextBox&#62; &#60;br /&#62; &#60;asp:Label ID=&#8221;Label3&#8243; runat=&#8221;server&#8221; Text=&#8221;Last Name&#8221; Width=&#8221;149px&#8221;&#62;&#60;/asp:Label&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=7&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:10pt;"></span><span style="font-size:10pt;"><font face="Times New Roman"><br />
PostBack to another page in ASP.net 2.0<span style="font-size:10pt;"><font face="Times New Roman"> </font></span><span style="font-size:10pt;"><font face="Times New Roman">You can use PostBackUrl attribute of Button control of source page to post to another page.</font></span><font face="Times New Roman"> </font></font></span></p>
<p style="margin:0;" class="MsoNormal"><font face="Times New Roman">FirstPage.aspx:</font></p>
<p><span style="font-size:9pt;color:blue;font-family:'Courier New';">&lt;</span><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">form</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:red;">id</span><span style="color:blue;">=&#8221;form1&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span>    </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;Label1&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">Text</span><span style="color:blue;">=&#8221;First Page&#8221;</span> <span style="color:red;">Width</span><span style="color:blue;">=&#8221;305px&#8221;</span> <span style="color:red;">ForeColor</span><span style="color:blue;">=&#8221;Navy&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:blue;">&gt;<br />
&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;Label2&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">Text</span><span style="color:blue;">=&#8221;First Name&#8221;</span> <span style="color:red;">Width</span><span style="color:blue;">=&#8221;149px&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">TextBox</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;txtFirstName&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">TextBox</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;Label3&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">Text</span><span style="color:blue;">=&#8221;Last Name&#8221;</span> <span style="color:red;">Width</span><span style="color:blue;">=&#8221;149px&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">TextBox</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;txtLastName&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">TextBox</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;">   </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> </span> <span style="color:red;"> <br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Button</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;BtnSubmit&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">PostBackUrl</span><span style="color:blue;">=&#8221;~/SecondPage.aspx&#8221;</span> <span style="color:red;">Text</span><span style="color:blue;">=&#8221;Go To Second Page&#8221;</span> <span style="color:blue;">/&gt;&lt;/</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;/</span><span style="color:#a31515;">form</span><span style="color:blue;">&gt;</span></span><span style="font-size:9pt;"></span></p>
<p style="margin:0;" class="MsoNormal"><font face="Times New Roman">SecondPage.aspx:</font></p>
<p><span style="font-size:9pt;color:blue;font-family:'Courier New';">&lt;</span><span style="font-size:9pt;color:#a31515;font-family:'Courier New';">form</span><span style="font-size:9pt;font-family:'Courier New';"> <span style="color:red;">id</span><span style="color:blue;">=&#8221;form1&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;Label1&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">Text</span><span style="color:blue;">=&#8221;Second Page&#8221;</span> <span style="color:red;">Width</span><span style="color:blue;">=&#8221;305px&#8221;</span> <span style="color:red;">ForeColor</span><span style="color:blue;">=&#8221;Navy&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:blue;">&gt;<br />
</span><span style="color:red;">  </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;</span></span><span style="font-size:9pt;font-family:'Courier New';"><span> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;Label2&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">Text</span><span style="color:blue;">=&#8221;First Name&#8221;</span> <span style="color:red;">Width</span><span style="color:blue;">=&#8221;149px&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;LblFirstName&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">ForeColor</span><span style="color:blue;">=&#8221;#C00000&#8243;</span> <span style="color:red;">Width</span><span style="color:blue;">=&#8221;157px&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:blue;">&gt;<br />
</span><span style="color:red;"> </span><span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;Label4&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">Text</span><span style="color:blue;">=&#8221;Last Name&#8221;</span> <span style="color:red;">Width</span><span style="color:blue;">=&#8221;149px&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;LblLastName&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">Text</span><span style="color:blue;">=&#8221;LblLastName&#8221;</span> <span style="color:red;">ForeColor</span><span style="color:blue;">=&#8221;#C00000&#8243;</span> <span style="color:red;">Width</span><span style="color:blue;">=&#8221;155px&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">Label</span><span style="color:blue;">&gt;<br />
&lt;/</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">&lt;/</span><span style="color:#a31515;">form</span><span style="color:blue;">&gt;</span></span><span style="font-size:9pt;"></span></p>
<p style="margin:0;" class="MsoNormal"><font face="Times New Roman">SecondPage.aspx.cs:</font></p>
<p><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">protected</span> <span style="color:blue;">void</span> Page_Load(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">EventArgs</span> e)<br />
</span><span style="font-size:9pt;font-family:'Courier New';">{</span><span style="font-size:9pt;font-family:'Courier New';"><span>   <br />
</span><span style="color:green;">// First we get a reference to the source page by</span></span><span style="font-size:9pt;font-family:'Courier New';"><span>  <br />
</span><span style="color:green;">//using the target page&#8217;s PreviousPage property, </span></span><span style="font-size:9pt;font-family:'Courier New';"><span>   <br />
</span><span style="color:green;">//this PreviousPage property holds the posted page.</span></span><span style="font-size:9pt;font-family:'Courier New';"><span>   <br />
</span><span style="color:green;">//Now we check if this property(PreviousPage)is null or not.<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">if</span> (Page.PreviousPage != <span style="color:blue;">null</span>)<br />
</span><span style="font-size:9pt;font-family:'Courier New';">{</span><span style="font-size:9pt;font-family:'Courier New';"><span>    <br />
</span><span style="color:green;">// Now we call the FindControl method to get the control<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:#2b91af;">TextBox</span> FirstNameTextBox =<br />
</span><span style="font-size:9pt;font-family:'Courier New';">(<span style="color:#2b91af;">TextBox</span>)Page.PreviousPage.FindControl(<span style="color:#a31515;">&#8220;txtFirstName&#8221;</span>);<br />
</span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:#2b91af;">TextBox</span> LastNameTextBox =<br />
</span><span style="font-size:9pt;font-family:'Courier New';">(<span style="color:#2b91af;">TextBox</span>)Page.PreviousPage.FindControl(<span style="color:#a31515;">&#8220;txtLastName&#8221;</span>);<br />
</span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:green;">// If it is not null then show the result.<br />
</span></span><span style="font-size:9pt;font-family:'Courier New';"><span style="color:blue;">if</span> (FirstNameTextBox != <span style="color:blue;">null</span>)<br />
</span><span style="font-size:9pt;font-family:'Courier New';">{</span><span style="font-size:9pt;font-family:'Courier New';"><span>        <br />
</span>LblFirstName.Text = FirstNameTextBox.Text;</span><span style="font-size:9pt;font-family:'Courier New';"><span> <br />
</span>}</span><span style="font-size:9pt;font-family:'Courier New';"><span>        <br />
</span><span style="color:blue;">if</span> (LastNameTextBox != <span style="color:blue;">null</span>)</span><span style="font-size:9pt;font-family:'Courier New';"><span>      <br />
</span>{</span><span style="font-size:9pt;font-family:'Courier New';"><span>        <br />
</span>LblLastName.Text = LastNameTextBox.Text;</span><span style="font-size:9pt;font-family:'Courier New';"><span>      <br />
</span>}</span><span style="font-size:9pt;font-family:'Courier New';"><span>   <br />
</span>}</span><span style="font-size:10pt;font-family:'Courier New';"><span> <br />
</span>}<br />
</span><span style="font-size:9pt;color:red;font-family:'Courier New';">For more detail reading please check: </span></p>
<p><span style="font-size:9pt;color:blue;font-family:'Courier New';"><a href="http://msdn2.microsoft.com/en-us/library/6c3yckfw.asp">http://msdn2.microsoft.com/en-us/library/6c3yckfw.asp</a></p>
<p></span><span style="font-size:9pt;color:blue;font-family:'Courier New';"><span style="font-size:9pt;color:blue;font-family:'Courier New';">- Harpreet Virk</span></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hsvirk.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hsvirk.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hsvirk.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hsvirk.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hsvirk.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hsvirk.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hsvirk.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hsvirk.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hsvirk.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hsvirk.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hsvirk.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hsvirk.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hsvirk.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hsvirk.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hsvirk.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hsvirk.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=7&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hsvirk.wordpress.com/2007/10/30/how-to-access-controls-value-to-another-page-pass-values-between-web-pages-in-aspnet-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48c5825805a98640563e7e6c0c0dd0c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Harpreet</media:title>
		</media:content>
	</item>
		<item>
		<title>List Controls in ASP.NET 2.0</title>
		<link>http://hsvirk.wordpress.com/2007/10/30/list-controls-in-aspnet-20/</link>
		<comments>http://hsvirk.wordpress.com/2007/10/30/list-controls-in-aspnet-20/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 01:14:26 +0000</pubDate>
		<dc:creator>hsvirk</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hsvirk.wordpress.com/2007/10/30/list-controls-in-aspnet-20/</guid>
		<description><![CDATA[List Controls in ASP.NET 2.0   All the list controls inherit from the System.Web.UI.WebControls.ListControl class.  Following are the ListControl Class Properties: 1.  AutoPostBack: If AutoPostBack is true, the form is automatically posted back when the user changes the current selection. 2.  DataSource: Specify the data source for the items. 3.  DataMember: The DataMember property is used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=5&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:10pt;font-family:'Verdana','sans-serif';">List Controls in ASP.NET 2.0<br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> <br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">All the list controls inherit from the <strong>S</strong></span><span style="font-size:10pt;font-family:'Verdana','sans-serif';"><strong>ystem.Web.UI.WebControls.ListControl</strong> class.</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> </span><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> </span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">Following are the <strong>ListControl</strong> Class Properties:</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> </span><span style="font-size:10pt;font-family:'Verdana','sans-serif';"><span style="font-size:10pt;font-family:'Verdana','sans-serif';">1.<span>  </span></span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">AutoPostBack: </span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';">If AutoPostBack is true, the form is automatically posted back when the user changes the current selection.<br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">2.<span>  </span></span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">DataSource:</span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> Specify the data source for the items.<br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">3.<span>  </span></span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">DataMember: </span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';">The DataMember property is used to identify the table user want to use.<br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">4.<span>  </span></span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">DataTextField:</span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> Indicates the field from data source to use for option text.<br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">5.<span>  </span></span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">DataValueField:</span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> Indicates the field from data source to use for option Value.<br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">6.<span>  </span></span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">DataTextFormatString:</span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> Gets or sets the formatting string used to control how data bound to the list control is displayed.<br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">7.<span>  </span></span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">Items: </span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';">Returns a collection of ListItem items.<br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">8.<span>  </span></span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">SelectedIndex:</span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> Returns or sets the index of the selected item.<br />
</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">9.<span>  </span></span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">SelectedItem: </span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';">Returns a ListItem that represent the currently selected Item</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> </span><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> </span><span style="font-size:10pt;font-family:'Verdana','sans-serif';">List Controls:</span><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> </span></span></p>
<ol>
<li class="MsoNormal"><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">BulletedList: </span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';">BulletedList controls display list of items with a variety of bullet styles. <em><u>User can also use this control to create a list of hyperlinks</u></em><u>.</u>BulletStyle property can be used to decide what type of style is needed. It can be Numbered (1, 2, 3…), LowerAlpha (a, b, c…) and UpperAlpha (A, B, C…), LowerRoman (i, ii, iii…) and UpperRoman (I, II, III…), and the bullet symbols Disc, Circle, Square.</span></li>
<li class="MsoNormal"><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">CheckBoxList: </span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';">Represents a list of check boxes. Each list item in a CheckBoxList represents an individual check box.</span></li>
<li class="MsoNormal"><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">DropDownList:</span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> Allows the user to select a single item from a drop-down list.</span></li>
<li class="MsoNormal"><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">ListBox:</span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> Displays a list of items from which user can make a selection.</span></li>
<li class="MsoNormal"><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">RadioButtonList:</span></strong><span style="font-size:10pt;font-family:'Verdana','sans-serif';"> The items are rendered as radio buttons.</span></li>
</ol>
<p><span style="font-size:10pt;font-family:'Arial','sans-serif';"> </span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">Code:</span></strong><span style="font-size:10pt;font-family:'Courier New';">ListControl.aspx.cs</span><font face="Times New Roman"> </font><span style="font-size:10pt;font-family:'Courier New';"> <br />
<span style="font-size:10pt;color:blue;font-family:'Courier New';">protected</span><span style="font-size:10pt;font-family:'Courier New';"> <span style="color:blue;">void</span> Page_Load(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">EventArgs</span> e)</span><span style="font-size:10pt;font-family:'Courier New';"><span>       <br />
    </span>{<span>     </span></span><span style="font-size:10pt;font-family:'Courier New';"><span>           <br />
       </span><span style="color:#2b91af;">ArrayList</span> aryColor = <span style="color:blue;">new</span> <span style="color:#2b91af;">ArrayList</span>();</span><span style="font-size:10pt;font-family:'Courier New';"> </span><span style="font-size:10pt;font-family:'Courier New';"><span>           <br />
       </span><span style="color:blue;">if</span> (!Page.IsPostBack)</span><span style="font-size:10pt;font-family:'Courier New';"><span>           <br />
          </span>{</span><span style="font-size:10pt;font-family:'Courier New';"><span>               <br />
            </span>aryColor.Add(<span style="color:#a31515;">&#8220;Red&#8221;</span>);<br />
          </span><span style="font-size:10pt;font-family:'Courier New';"><span>  </span>aryColor.Add(<span style="color:#a31515;">&#8220;Black&#8221;</span>);<br />
          </span><span style="font-size:10pt;font-family:'Courier New';"><span>  </span>aryColor.Add(<span style="color:#a31515;">&#8220;White&#8221;</span>);<br />
          </span><span style="font-size:10pt;font-family:'Courier New';"><span>  </span>aryColor.Add(<span style="color:#a31515;">&#8220;Blue&#8221;</span>);</span></span></p>
<p><span style="font-size:10pt;font-family:'Courier New';"><span style="font-size:10pt;font-family:'Courier New';">       </span><span style="font-size:10pt;font-family:'Courier New';"> </span><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:green;">//CheckBoxList<br />
        </span></span><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>ChklColor.DataSource = aryColor;<br />
        </span><span style="font-size:10pt;font-family:'Courier New';"><span>    </span>ChklColor.DataBind();<br />
        </span><span style="font-size:10pt;font-family:'Courier New';"><span>    </span><span style="color:green;">//DropDownList</span></span><span style="font-size:10pt;font-family:'Courier New';"><span>     <br />
            </span>DdlColor.DataSource = aryColor;</span><span style="font-size:10pt;font-family:'Courier New';"><span> <br />
            </span>DdlColor.DataBind();</span><span style="font-size:10pt;font-family:'Courier New';"><span>            <br />
            </span><span style="color:green;">//ListBox</span></span><span style="font-size:10pt;font-family:'Courier New';"><span>            <br />
            </span>LbColor.DataSource = aryColor;<br />
          </span><span style="font-size:10pt;font-family:'Courier New';"><span>  </span>LbColor.DataBind();</span><span style="font-size:10pt;font-family:'Courier New';"><span>           <br />
            </span><span style="color:green;">//RadioButtonList</span></span><span style="font-size:10pt;font-family:'Courier New';"><span>             <br />
            </span>RblColor.DataSource = aryColor;<br />
          </span><span style="font-size:10pt;font-family:'Courier New';"><span>  </span>RblColor.DataBind();</span><span style="font-size:10pt;font-family:'Courier New';"><span> <br />
            </span><span style="color:green;">//BulletedList</span></span><span style="font-size:10pt;font-family:'Courier New';"><span>   <br />
            </span>BlColor.DataSource = aryColor;<br />
          </span><span style="font-size:10pt;font-family:'Courier New';"><span>  </span>BlColor.DataBind();<br />
</span><span style="font-size:10pt;font-family:'Courier New';"><span>  </span></span><span style="font-size:10pt;font-family:'Courier New';"><span>       </span>}</span><span style="font-size:10pt;font-family:'Courier New';"> </span><span style="font-size:10pt;font-family:'Courier New';"><span>    <br />
    </span>}</span></span><span style="font-size:10pt;font-family:'Courier New';"> <br />
</span><strong><span style="font-size:9pt;font-family:'Verdana','sans-serif';">Code:</span></strong><span style="font-size:10pt;font-family:'Courier New';">ListControl.aspx</span><span style="font-size:10pt;font-family:'Courier New';"> </span><span style="font-size:10pt;font-family:'Courier New';">    <br />
<span style="font-size:10pt;font-family:'Courier New';"><span style="font-size:10pt;color:blue;font-family:'Courier New';">&lt;</span><span style="font-size:10pt;color:#a31515;font-family:'Courier New';">form</span><span style="font-size:10pt;font-family:'Courier New';"> <span style="color:red;">id</span><span style="color:blue;">=&#8221;form1&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">CheckBoxList</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;ChklColor&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;<br />
&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">CheckBoxList</span><span style="color:blue;">&gt;</span> <span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">DropDownList</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;DdlColor&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;<br />
&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">DropDownList</span><span style="color:blue;">&gt;</span> <span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">ListBox</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;LbColor&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;<br />
&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">ListBox</span><span style="color:blue;">&gt;</span> <span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;</span></span><span style="font-size:10pt;font-family:'Courier New';"><span> <br />
</span><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">RadioButtonList</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;RblColor&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;<br />
&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">RadioButtonList</span><span style="color:blue;">&gt;</span> <span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;</span></span><span style="font-size:10pt;font-family:'Courier New';"><span>       <br />
</span><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">BulletedList</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;BlColor&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;</span> <span style="color:red;">BulletStyle</span><span style="color:blue;">=&#8221;Circle&#8221;&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">BulletedList</span><span style="color:blue;">&gt;</span> <span style="color:blue;">&lt;</span><span style="color:#a31515;">br</span> <span style="color:blue;">/&gt;<br />
</span></span></span></span><span style="font-size:10pt;font-family:'Courier New';"><span style="font-size:10pt;font-family:'Courier New';"><span style="font-size:10pt;font-family:'Courier New';"><span style="color:blue;"><br />
</span></span><span style="font-size:10pt;color:green;font-family:'Courier New';">&lt;!&#8211; Hyperlink BulletedList &#8211;&gt;</span><span style="font-size:10pt;font-family:'Courier New';"><span>       <br />
</span><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">BulletedList</span> <span style="color:red;">ID</span><span style="color:blue;">=&#8221;BlHyperlink&#8221;</span> <span style="color:red;">DisplayMode</span><span style="color:blue;">=&#8221;HyperLink&#8221;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;</span><span>   </span></span><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;">ListItem</span> <span style="color:red;">Value</span><span style="color:blue;">=&#8221;http://www.google.com&#8221;&gt;</span>GOOGLE<span style="color:blue;">&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">ListItem</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">ListItem</span> <span style="color:red;">Value</span><span style="color:blue;">=&#8221;http://www.asp.net&#8221;&gt;</span>ASP.NET<span style="color:blue;">&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">ListItem</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">ListItem</span> <span style="color:red;">Value</span><span style="color:blue;">=&#8221;http://msdn.microsoft.com&#8221;&gt;</span>MSDN<span style="color:blue;">&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">ListItem</span><span style="color:blue;">&gt;<br />
</span></span><span style="font-size:10pt;font-family:'Courier New';"><span style="color:blue;">&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">BulletedList</span><span style="color:blue;">&gt;</span></span></span></span></p>
<p style="margin:0 0 0 0.25in;" class="MsoNormal"><span style="font-size:10pt;font-family:'Courier New';"><span> </span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">form</span><span style="color:blue;">&gt;</p>
<p>- Harpreet virk</span></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hsvirk.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hsvirk.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hsvirk.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hsvirk.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hsvirk.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hsvirk.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hsvirk.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hsvirk.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hsvirk.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hsvirk.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hsvirk.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hsvirk.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hsvirk.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hsvirk.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hsvirk.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hsvirk.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hsvirk.wordpress.com&amp;blog=2003393&amp;post=5&amp;subd=hsvirk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hsvirk.wordpress.com/2007/10/30/list-controls-in-aspnet-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48c5825805a98640563e7e6c0c0dd0c8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Harpreet</media:title>
		</media:content>
	</item>
	</channel>
</rss>
