<?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>Programming Stuff</title>
	<atom:link href="http://amitpatriwala.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://amitpatriwala.wordpress.com</link>
	<description>Technologies are not Concern for us. We are developing rapid applications.</description>
	<lastBuildDate>Thu, 29 Dec 2011 06:59:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='amitpatriwala.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Programming Stuff</title>
		<link>http://amitpatriwala.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://amitpatriwala.wordpress.com/osd.xml" title="Programming Stuff" />
	<atom:link rel='hub' href='http://amitpatriwala.wordpress.com/?pushpress=hub'/>
		<item>
		<title>JFolder-folder-Path-is-not-a-folder</title>
		<link>http://amitpatriwala.wordpress.com/2011/12/29/jfolder-folder-path-is-not-a-folder/</link>
		<comments>http://amitpatriwala.wordpress.com/2011/12/29/jfolder-folder-path-is-not-a-folder/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 06:59:56 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=551</guid>
		<description><![CDATA[Hello Friends, Today, one of my colleges getting an error in Joomla admin – “JFolder::folder: Path is not a folder“ . We’ve tried lots of thing but cannot resolve, finally we’ve found the below solution. Please remove the cache from cache folder or make a new cache folder. Thanks.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=551&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello Friends,</p>
<p>Today, one of my colleges getting an error in Joomla admin – “JFolder::folder: Path is not a folder“ . We’ve tried lots of thing but cannot resolve, finally we’ve found the below solution.</p>
<blockquote><p><span style="color:#0000ff;"><strong>Please remove the cache from cache folder or make a new cache folder.</strong></span></p></blockquote>
<p>Thanks.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/551/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/551/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/551/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=551&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2011/12/29/jfolder-folder-path-is-not-a-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>
	</item>
		<item>
		<title>Remove duplicate rows from a table in SQL Server</title>
		<link>http://amitpatriwala.wordpress.com/2011/05/12/remove-duplicate-rows-from-a-table-in-sql-server/</link>
		<comments>http://amitpatriwala.wordpress.com/2011/05/12/remove-duplicate-rows-from-a-table-in-sql-server/#comments</comments>
		<pubDate>Thu, 12 May 2011 19:21:36 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[remove duplicate rows from a table in SQL Server]]></category>
		<category><![CDATA[Removing Duplicate Records]]></category>
		<category><![CDATA[Use the ROW_NUMBER Over Partition by]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=543</guid>
		<description><![CDATA[Hello Friends, I have tried to remove the duplicate rows from the table using row_number function. Here I am explaining the demo using the temp table. Steps: 1. Create Temp Table or Select your table Create Table #Main ( id int, item varchar(100) ) 2. Insert some records insert into #main values (119,1) insert into [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=543&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello Friends,</p>
<p>I have tried to remove the duplicate rows from the table using row_number function. Here I am explaining the demo using the temp table.</p>
<p>Steps:</p>
<p><strong>1. Create Temp Table or Select your table<br />
</strong><br />
Create Table #Main</p>
<p>(</p>
<p>id int,</p>
<p>item varchar(100)</p>
<p>)</p>
<p><strong>2. Insert some records</strong></p>
<p>insert into #main values (119,1)</p>
<p>insert into #main values (119,2)</p>
<p>insert into #main values (119,2)</p>
<p>insert into #main values (119,3)</p>
<p>insert into #main values (119,3)</p>
<p>insert into #main values (119,4)</p>
<p>insert into #main values (119,5)</p>
<p>insert into #main values (119,6)</p>
<p>insert into #main values (119,7)</p>
<p>insert into #main values (119,8)</p>
<p>insert into #main values (119,8)</p>
<p>insert into #main values (119,8)<br />
<strong><br />
3. expected Output</strong></p>
<p>&#8211;Output</p>
<p>&#8211;119 1</p>
<p>&#8211;119 2</p>
<p>&#8211;119 3</p>
<p>&#8211;119 4</p>
<p>&#8211;119 5</p>
<p>&#8211;119 6</p>
<p>&#8211;119 7</p>
<p>&#8211;119 8</p>
<p><strong>4. first we have start to get single records</strong></p>
<p>&#8211;we got those record which count =1</p>
<p>select id,item from</p>
<p>(</p>
<p>select *,</p>
<p>(select count(item) as NoOfCount from #Main where item =Mst.Item group by id,item) as NCount</p>
<p>from #Main Mst</p>
<p>)a</p>
<p>where NCount =1</p>
<p><strong>5. Result 1</strong></p>
<p>&#8211;Result</p>
<p>&#8211;119  1</p>
<p>&#8211;119  4</p>
<p>&#8211;119  5</p>
<p>&#8211;119  6</p>
<p>&#8211;119  7</p>
<p><strong>6. Now find the records where item count is &gt;1</strong></p>
<p>&#8211;we got those record which count &gt;1</p>
<p>select id,item from</p>
<p>(</p>
<p>select id,item,ROW_NUMBER()Over(Partition by Item Order by Item) As Rep</p>
<p>from</p>
<p>(</p>
<p>select *,</p>
<p>(select count(item) as NoOfCount from #Main where item =Mst.Item group by id,item) as NCount</p>
<p>from #Main Mst</p>
<p>)a where NCount&gt;1</p>
<p>)RepT where rep=1</p>
<p><strong>7. Result 2</strong></p>
<p>&#8211;Result</p>
<p>&#8211;119  2</p>
<p>&#8211;119  3</p>
<p>&#8211;119  8</p>
<p><strong>8. Result 1 Union Result 2</strong><br />
<strong><br />
9. Output</strong></p>
<p>&#8211;Result</p>
<p>&#8211;119  1</p>
<p>&#8211;119  4</p>
<p>&#8211;119  5</p>
<p>&#8211;119  6</p>
<p>&#8211;119  7</p>
<p>&#8211;119  2</p>
<p>&#8211;119  3</p>
<p>&#8211;119  8</p>
<p>Thanks,</p>
<p><a href="http://www.ibusiness-management.com/">Http://www.ibusiness-management.com</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/543/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=543&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2011/05/12/remove-duplicate-rows-from-a-table-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>
	</item>
		<item>
		<title>Outlook blocked access to the following potentially unsafe attachments</title>
		<link>http://amitpatriwala.wordpress.com/2011/05/11/outlook-blocked-access-to-the-following-potentially-unsafe-attachments/</link>
		<comments>http://amitpatriwala.wordpress.com/2011/05/11/outlook-blocked-access-to-the-following-potentially-unsafe-attachments/#comments</comments>
		<pubDate>Wed, 11 May 2011 17:10:17 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=537</guid>
		<description><![CDATA[Hello Friends, I have come across the problem when I getting the .chm extension in my mail. I have found the solution which is below. Steps: Exit Outlook if it is running. Click Start, and then click Run. Copy and paste (or type) the following command in the Open box, and then press ENTER:               [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=537&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello Friends,</p>
<p>I have come across the problem when I getting the .chm extension in my mail.</p>
<p>I have found the solution which is below.</p>
<p><strong>Steps:</strong></p>
<ol start="1">
<li>Exit Outlook if it is running.</li>
</ol>
<ol start="2">
<li>Click <strong>Start</strong>, and then click <strong>Run</strong>. Copy and paste (or type) the following command in the <strong>Open</strong> box, and then press ENTER:</li>
</ol>
<p style="text-align:left;">              regedit</p>
<ol start="3">
<li>Verify that the following registry key for your version of Outlook exists.<br />
<strong>Microsoft Office Outlook 2010</strong></li>
</ol>
<p>HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security</p>
<p><strong>             Microsoft Office Outlook 2007 </strong></p>
<p>HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security</p>
<p style="text-align:left;"><strong>             Microsoft Office Outlook 2003 </strong></p>
<p style="text-align:left;">             HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security</p>
<p style="text-align:left;"><strong>             Microsoft Outlook 2002</strong></p>
<p style="text-align:left;">             HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security</p>
<p style="text-align:left;"><strong>             Microsoft Outlook 2000</strong></p>
<p style="text-align:left;">             HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Security</p>
<p style="text-align:left;">             If the registry key exists, go to step 5.</p>
<p style="text-align:left;">             If the registry key does not exist, follow these steps to create it:</p>
<ol start="3">
<ol start="1">
<li style="text-align:left;">Locate, and then click the following registry key:</li>
</ol>
</ol>
<p>HKEY_CURRENT_USER\Software\Microsoft</p>
<ol start="3">
<ol start="2">
<li>Under <strong>Edit</strong>, click <strong>New</strong>, and then click <strong>Key</strong>.</li>
<li>Type Office, and then press ENTER.</li>
<li>Under <strong>Edit</strong>, click <strong>New</strong>, and then click <strong>Key</strong>.</li>
<li>For Outlook 2010, type 14.0, and then press ENTER.<br />
For Outlook 2007, type 12.0, and then press ENTER.<br />
For Outlook 2003, type 11.0, and then press ENTER.<br />
For Outlook 2002, type 10.0, and then press ENTER.<br />
For Outlook 2000, type 9.0, and then press ENTER.</li>
<li>Under <strong>Edit</strong>, click <strong>New</strong>, and then click <strong>Key</strong>.</li>
<li>Type Outlook, and then press ENTER.</li>
<li>Under <strong>Edit</strong>, click <strong>New</strong>, and then click <strong>Key</strong>.</li>
<li>Type Security, and then press ENTER.</li>
</ol>
</ol>
<ol start="4">
<li>Under <strong>Edit</strong>, click <strong>New</strong>, and then click <strong>String Value</strong>.</li>
</ol>
<ol start="5">
<li>Copy and paste (or type) the following name for the new value:</li>
</ol>
<p>Level1Remove</p>
<ol start="6">
<li>Press ENTER.</li>
</ol>
<ol start="7">
<li>Right-click the new string value name, and then click <strong>Modify</strong>.</li>
</ol>
<ol start="8">
<li>Type the file name extension of the file type that you want to open in Outlook. For example:</li>
</ol>
<p>.exe</p>
<p>To specify multiple file types, use the following format:</p>
<p>.exe;.chm</p>
<ol start="9">
<li>Click <strong>OK</strong>.</li>
</ol>
<ol start="10">
<li>Exit Registry Editor.</li>
</ol>
<ol start="11">
<li>Restart your computer.</li>
</ol>
<p>Thanks.</p>
<p>http://www.ibusiness-management.com</p>
<p>Reference Site:</p>
<p><a title="http://support.microsoft.com/kb/829982" href="http://support.microsoft.com/kb/829982" target="_blank">http://support.microsoft.com/kb/829982</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/537/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=537&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2011/05/11/outlook-blocked-access-to-the-following-potentially-unsafe-attachments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>
	</item>
		<item>
		<title>export select query result in to pipe delimiter Textfile</title>
		<link>http://amitpatriwala.wordpress.com/2010/04/02/export-select-query-result-in-to-pipe-delimiter-textfile/</link>
		<comments>http://amitpatriwala.wordpress.com/2010/04/02/export-select-query-result-in-to-pipe-delimiter-textfile/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 22:44:39 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[SqlServer]]></category>
		<category><![CDATA[bcp queryout pipe delimiter]]></category>
		<category><![CDATA[export select query result in to pipe delimiter Textfile]]></category>
		<category><![CDATA[export to a pipe delimited .txt file]]></category>
		<category><![CDATA[Pipe Delimited Export Option]]></category>
		<category><![CDATA[Pipe Delimited Export Option In Sqlserver 2005]]></category>
		<category><![CDATA[select query out put save in to pipe delimiter file]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=505</guid>
		<description><![CDATA[Hello Friends, I have a table that I need to export to a pipe delimited .txt file.please follow the below step to do that things. Steps 1: [http://amitpatriwala.wordpress.com/2010/04/02/save-select-query-result-into-textfile/] Enabled the xp_cmdshell By default disabled in SQL 2005 for security reasons. To enable it, use the Surface Area Configuration tool or sp_configure To enable xp_cmdshell using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=505&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello Friends,</p>
<p>I have a table that I need to export to a pipe delimited .txt file.please follow the below step to do that things.</p>
<p><strong>Steps 1:</strong> [<a title="save-select-query-result-into-textfile" href="http://amitpatriwala.wordpress.com/2010/04/02/save-select-query-result-into-textfile/" target="_blank">http://amitpatriwala.wordpress.com/2010/04/02/save-select-query-result-into-textfile/</a>]</p>
<p>Enabled the xp_cmdshell</p>
<p>By default disabled in SQL 2005 for security reasons.</p>
<p>To enable it, use the Surface Area Configuration tool or sp_configure</p>
<p>To enable xp_cmdshell using sp_configure, use below query :</p>
<p><em>EXEC master.dbo.sp_configure &#8216;show advanced options&#8217;, 1</em></p>
<p><em>RECONFIGURE</em></p>
<p><em>EXEC master.dbo.sp_configure &#8216;xp_cmdshell&#8217;, 1</em></p>
<p><em> RECONFIGURE</em></p>
<p><strong>Steps 2:</strong></p>
<p><em>EXEC master..xp_cmdshell &#8216;bcp &#8220;select * from Adbrite..Adtype&#8221; queryout &#8220;c:\text.txt&#8221; -U sa -P sa123-c -t^| -x&#8217; </em></p>
<p><em>Database Name : Adbrite</em></p>
<p><em>Table Name : Adtype</em></p>
<p><em>Sql User Name : sa</em></p>
<p><em>Sql Password : sa123</em></p>
<p><em>delimiter option : </em><em>t^|</em></p>
<p><em>thnx</em></p>
<p><em><a title="iBusinessManagment" href="http://www.ibusiness-management.com/" target="_blank"><br />
http://www.ibusiness-management.com/</a> </em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/505/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=505&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2010/04/02/export-select-query-result-in-to-pipe-delimiter-textfile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>
	</item>
		<item>
		<title>Save Select query result into Textfile</title>
		<link>http://amitpatriwala.wordpress.com/2010/04/02/save-select-query-result-into-textfile/</link>
		<comments>http://amitpatriwala.wordpress.com/2010/04/02/save-select-query-result-into-textfile/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 00:27:48 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[SqlServer]]></category>
		<category><![CDATA[export query results into text file in SQL Server]]></category>
		<category><![CDATA[Output an query save into Textfile]]></category>
		<category><![CDATA[Select query result save into Textfile in sqlserver]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=499</guid>
		<description><![CDATA[Here I am explaining how to export query results into text file. Please follow below steps to archive this thing. Step 1: Enabled the xp_cmdshell By default disabled in SQL 2005 for security reasons. To enable it, use the Surface Area Configuration tool or sp_configure To enable xp_cmdshell using sp_configure, use below query : EXEC [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=499&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here I am explaining how to export query results into text file. Please follow below steps to archive this thing.</p>
<p>Step 1:</p>
<p><strong>Enabled the xp_cmdshell</strong></p>
<p>By default disabled in SQL 2005 for security reasons.</p>
<p>To enable it, use the Surface Area Configuration tool or sp_configure</p>
<p>To enable xp_cmdshell using sp_configure, use below query :</p>
<p><em>EXEC master.dbo.sp_configure &#8216;show advanced options&#8217;, 1</em></p>
<p><em>RECONFIGURE</em></p>
<p><em>EXEC master.dbo.sp_configure &#8216;xp_cmdshell&#8217;, 1</em></p>
<p><em>RECONFIGURE</em></p>
<p>Step2:</p>
<p><strong>To save your SELECT query results to a text file, use below query :</strong><br />
<em><br />
EXEC master..xp_cmdshell &#8216;bcp &#8220;select * from adtype.dbo.adbrite&#8221; queryout &#8220;c:\text.txt&#8221; -c -T -x&#8217;</em></p>
<p><em>or</em></p>
<p><em>EXEC master..xp_cmdshell &#8216;bcp &#8220;select * from Adbrite..Adtype&#8221; queryout &#8220;c:\text.txt&#8221; -U sa -P sa123-c -T -x&#8217;</em></p>
<p>Database Name : Adbrite</p>
<p>Table Name : Adtype</p>
<p>Database User Name : sa</p>
<p>Database Password : sa123</p>
<p>Thnx</p>
<p><a title="iBusinessManagement" href="http://www.ibusiness-management.com/" target="_blank">http://www.ibusiness-management.com/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/499/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/499/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/499/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=499&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2010/04/02/save-select-query-result-into-textfile/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>
	</item>
		<item>
		<title>Database configuration Error on drupal</title>
		<link>http://amitpatriwala.wordpress.com/2010/01/29/database-configuration-error-on-drupal/</link>
		<comments>http://amitpatriwala.wordpress.com/2010/01/29/database-configuration-error-on-drupal/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 13:59:45 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Database configuration drupal]]></category>
		<category><![CDATA[Database configuration Error on drupal]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=495</guid>
		<description><![CDATA[Hello, I have confused when I entering the right database credentials into the page but page is reload and shows the Database configuration again, without any error. I have start the search and finding that during the installation if you renamed the /sites/default/default.settings.php to  /sites/default/settings.php. Solutions: Copy the Settings File and rename it to default.settings.php. Thnx http://www.ibusiness-management.com/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=495&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<div id="_mcePaste">I have confused when I entering the right database credentials into the page but page is reload and shows the Database configuration again, without any error.</div>
<div></div>
<div>I have start the search and finding that during the installation if you renamed the <strong>/sites/default/default.settings.php</strong></div>
<p>to <strong> /sites/default/settings.php.</strong></p>
<p><strong>Solutions:</strong></p>
<p>Copy the Settings File and rename it to default.settings.php.</p>
<p>Thnx</p>
<p><a href="http://www.ibusiness-management.com/" title="iBusinessManagement">http://www.ibusiness-management.com/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/495/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/495/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/495/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=495&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2010/01/29/database-configuration-error-on-drupal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>
	</item>
		<item>
		<title>Deprecated: Function ereg() is deprecated in C:\wamp\www\drupal-6.14\includes\file.inc on line 902</title>
		<link>http://amitpatriwala.wordpress.com/2010/01/29/deprecated-function-eregi-is-deprecated-in-cwampwwwdrupal-6-14includesfile-inc-on-line-902/</link>
		<comments>http://amitpatriwala.wordpress.com/2010/01/29/deprecated-function-eregi-is-deprecated-in-cwampwwwdrupal-6-14includesfile-inc-on-line-902/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 13:39:35 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Function ereg() is deprecated when install Drupal]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=491</guid>
		<description><![CDATA[Hello, This message appear because I use latest wamp software that utilize php 5.3.0 where ereg() function is deprecated. Solutions: step 1: Goto Folder Drupal\includes step 2: Select File &#8220;file.inc&#8221; step 3: Goto 902 Line elseif ($depth &#62;= $min_depth &#38;&#38; ereg($mask, $file)) { Change the function ereg to mb_ereg elseif ($depth &#62;= $min_depth &#38;&#38; mb_ereg($mask, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=491&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>This message appear because I use latest wamp software that utilize php 5.3.0 where ereg() function is deprecated.</p>
<p><strong>Solutions:</strong></p>
<p>step 1: Goto Folder Drupal\includes</p>
<p>step 2: Select File &#8220;file.inc&#8221;</p>
<p>step 3:</p>
<p>Goto 902 Line</p>
<p><strong>elseif ($depth &gt;= $min_depth &amp;&amp; ereg($mask, $file)) {</strong></p>
<p>Change the function ereg to mb_ereg</p>
<p><strong>elseif ($depth &gt;= $min_depth &amp;&amp; mb_ereg($mask, $file)) {</strong></p>
<p>Thnx</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/491/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=491&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2010/01/29/deprecated-function-eregi-is-deprecated-in-cwampwwwdrupal-6-14includesfile-inc-on-line-902/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>
	</item>
		<item>
		<title>HierarchyId Data Type</title>
		<link>http://amitpatriwala.wordpress.com/2009/10/23/hierarchyid-data-type/</link>
		<comments>http://amitpatriwala.wordpress.com/2009/10/23/hierarchyid-data-type/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 11:26:06 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[SqlServer]]></category>
		<category><![CDATA[HIERARCHYID Data Type]]></category>
		<category><![CDATA[HIERARCHYID Data Type In Sql Server 2008]]></category>
		<category><![CDATA[How to use SQL Server 2008 hierarchyid data type]]></category>
		<category><![CDATA[new data types in sql server 2008]]></category>
		<category><![CDATA[Working with hierarchyid Data]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/2009/10/23/hierarchyid-data-type/</guid>
		<description><![CDATA[Here I Explained the New Data Type in Sqlserver 2008. What is HierarchIyd Data Type?&#160; HierarchyId data type is a variable length System Data Type. What is the use of HierarchyId Data Type? Represent position in a hierarchy manner. HierarchyId does not automatically represent a tree, it is depend on how to application generate and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=480&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><font size="3" face="Times New Roman">Here I Explained the New Data Type in Sqlserver 2008.</font></p>
<p><strong><font size="3" face="Times New Roman">What is HierarchIyd Data Type?&#160; </font></strong></p>
<p><font size="3" face="Times New Roman">HierarchyId data type is a variable length System Data Type.</font></p>
<p><strong><font size="3" face="Times New Roman">What is the use of HierarchyId Data Type?</font></strong></p>
<p><font size="3" face="Times New Roman">Represent position in a hierarchy manner.</font></p>
<p><font size="3" face="Times New Roman">HierarchyId does not automatically represent a tree, it is depend on how to application generate and assign HierarchyId values.</font></p>
<p><strong><font size="3" face="Times New Roman">HierarchyId have following properties:</font></strong></p>
<p><font size="3" face="Times New Roman">1) Extremely Compact</font></p>
<p><font size="3" face="Times New Roman">2) Comparison is in depth-first-order.</font></p>
<p><font size="3" face="Times New Roman">3) Support for arbitrary insertions and deletions.</font></p>
<p><strong><font size="3" face="Times New Roman">Limitation Of HierarchyId :</font></strong></p>
<p><font size="3" face="Times New Roman">1)&#160; Does not automatically represent a Tree</font></p>
<p><font size="3" face="Times New Roman">2) It is up to Application to manage concurrency in generating and assigning HierarchyId Values.</font></p>
<p><font size="3" face="Times New Roman">3) There is no any dependency on HierarchyId relationship.</font></p>
<p>&#160;</p>
<p><font size="3" face="Times New Roman"><strong>See more about HierarchyId example refer :</strong></font></p>
<p><a title="http://amitpatriwala.wordpress.com/2009/10/23/sql-server-2008-feature-part1/" href="http://amitpatriwala.wordpress.com/2009/10/23/sql-server-2008-feature-part1/"><font size="3" face="Times New Roman">http://amitpatriwala.wordpress.com/2009/10/23/sql-server-2008-feature-part1/</font></a></p>
<p><font size="3" face="Times New Roman"><strong>Reference Site :</strong></font></p>
<p><a title="http://technet.microsoft.com/en-us/library/bb677290.aspx" href="http://technet.microsoft.com/en-us/library/bb677290.aspx" target="_blank"><font size="3" face="Times New Roman">http://technet.microsoft.com/en-us/library/bb677290.aspx</font></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/480/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=480&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2009/10/23/hierarchyid-data-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>
	</item>
		<item>
		<title>Sql Server 2008 Feature &#8211; Part1</title>
		<link>http://amitpatriwala.wordpress.com/2009/10/23/sql-server-2008-feature-part1/</link>
		<comments>http://amitpatriwala.wordpress.com/2009/10/23/sql-server-2008-feature-part1/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 09:30:41 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[SqlServer]]></category>
		<category><![CDATA[Data Types in SQL Server 2008]]></category>
		<category><![CDATA[HIERARCHYID Data Type]]></category>
		<category><![CDATA[HIERARCHYID Data Type In Sql Server 2008]]></category>
		<category><![CDATA[New Built-in Data Types in SQL Server 2008]]></category>
		<category><![CDATA[new data types in sql server 2008]]></category>
		<category><![CDATA[New Features in SQL Server 2008]]></category>
		<category><![CDATA[Programmability Features in SQL Server 2008]]></category>
		<category><![CDATA[Sql Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 Overview]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/2009/10/23/sql-server-2008-feature-part1/</guid>
		<description><![CDATA[Here I am explaining Sql Server 2008 Key Features. 1) Initializing variable when you declare declare @val as int =0 declare @currentdate as datetime = getdate() print @val print @currentdate 2) Compound assignment operators &#8211;operator like +=,-=,/=,*/,%= declare @val as int = 0 set @val += 10; print @val 3) Add multiple row in single [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=479&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><font size="3" face="ar">Here I am explaining Sql Server 2008 Key Features.</font></p>
<p><strong><font size="3" face="ar">1) Initializing variable when you declare</font></strong></p>
<p><font size="3"><font face="ar"><span style="color:blue;">declare </span>@val <span style="color:blue;">as int </span><span style="color:gray;">=</span>0         <br /><span style="color:blue;">declare </span>@currentdate <span style="color:blue;">as datetime </span><span style="color:gray;">= </span><span style="color:magenta;">getdate</span></font></font><font size="3"><font face="ar"><span style="color:gray;">()          <br /></span><span style="color:blue;">print </span>@val         <br /><span style="color:blue;">print </span>@currentdate</font></font></p>
<p> <a href="http://11011.net/software/vspaste"></a>
<p><font size="3"><font face="ar"><strong>2) Compound assignment operators</strong> </font></font></p>
<p><font size="3"><font face="ar"><span style="color:green;">&#8211;operator like +=,-=,/=,*/,%=          <br /></span><span style="color:blue;">declare </span>@val <span style="color:blue;">as int </span><span style="color:gray;">= </span>0         <br /><span style="color:blue;">set </span>@val <span style="color:gray;">+= </span>10</font></font><font size="3"><font face="ar"><span style="color:gray;">;          <br /></span><span style="color:blue;">print </span>@val</font></font></p>
<p><strong><font size="3" face="ar">3) Add multiple row in single Insert Statement </font></strong></p>
<p> <a href="http://11011.net/software/vspaste"></a>
<pre class="code"><font size="3"><font face="ar"><span style="color:blue;">CREATE TABLE </span>Employee
</font></font><font size="3"><font face="ar"><span style="color:gray;">(
</span>EmpId <span style="color:blue;">int</span></font></font><font size="3"><font face="ar"><span style="color:gray;">,
</span>EmpCode <span style="color:blue;">varchar</span><span style="color:gray;">(</span>50</font></font><font size="3"><font face="ar"><span style="color:gray;">),
</span>EmpName <span style="color:blue;">varchar</span><span style="color:gray;">(</span>50</font></font><font size="3"><font face="ar"><span style="color:gray;">)
);

</span><span style="color:blue;">INSERT INTO </span>Employee<span style="color:gray;">(</span>EmpId<span style="color:gray;">, </span>EmpCode<span style="color:gray;">,</span>EmpName</font></font><span style="color:gray;"><font size="3" face="ar">)
  </font></span><font size="3"><font face="ar"><span style="color:blue;">VALUES
  </span><span style="color:gray;">(</span>1<span style="color:gray;">, </span><span style="color:red;">'emp1'</span><span style="color:gray;">,</span><span style="color:red;">'emp1'</span></font></font><font size="3"><font face="ar"><span style="color:gray;">),
  (</span>2<span style="color:gray;">, </span><span style="color:red;">'emp1'</span><span style="color:gray;">,</span><span style="color:red;">'emp1'</span></font></font><font size="3"><font face="ar"><span style="color:gray;">),
  (</span>3<span style="color:gray;">, </span><span style="color:red;">'emp1'</span><span style="color:gray;">,</span><span style="color:red;">'emp1'</span></font></font><font size="3"><font face="ar"><span style="color:gray;">);

</span><span style="color:blue;">select </span><span style="color:gray;">* </span><span style="color:blue;">from </span>Employee</font></font></pre>
<pre class="code"><strong><font size="3" face="ar">4) <font face="Arial">New Data Types</font></font></strong></pre>
<table border="1" cellspacing="0" cellpadding="2" width="475">
<tbody>
<tr>
<td valign="top" width="100"><font size="3">Data Type</font></td>
<td valign="top" width="373"><font size="3">Data Type Use</font></td>
</tr>
<tr>
<td valign="top" width="100"><font size="3">Date</font></td>
<td valign="top" width="373"><font size="3">The Date property returns a Date data type.</font></td>
</tr>
<tr>
<td valign="top" width="100"><font size="3">Time </font></td>
<td valign="top" width="373"><font size="3">Returns values for any valid time of day between 00:00:00 and 23:59:59:9999999. It has a length of at least 8 positions and contains the time in hours,minutes, seconds and fractional seconds.</font></td>
</tr>
<tr>
<td valign="top" width="100"><font size="3">DateTime2</font></td>
<td valign="top" width="373"><font size="3">DateTime2 is an extension of the existing DATETIME type. It has a large date range and large default fractional precision. It has a length of at least 19 positions.</font></td>
</tr>
<tr>
<td valign="top" width="100"><font size="3">DateTimeOffSet</font></td>
<td valign="top" width="373"><font size="3">Returns values for year, month, day, valid time of day between 00:00:00 and 23:59:59:9999999 and offset, in hours, from UTC. It has a length of at least 25 positions.</font></td>
</tr>
<tr>
<td valign="top" width="100"><font size="3">Hierarchyid</font></td>
<td valign="top" width="373"><font size="3">The HierarchyId property is used to identify a position in a hierarchy.</font></td>
</tr>
<tr>
<td valign="top" width="100"><font size="3">Geography</font></td>
<td valign="top" width="373"><font size="3">The SQL Server geography data type stores ellipsoidal (round-earth) data, such as GPS latitude and longitude coordinates</font></td>
</tr>
<tr>
<td valign="top" width="100"><font size="3">Geometry</font></td>
<td valign="top" width="373"><font size="3">The Geometry property contains spatial data that represents information about the physical location and shape of geometric objects.</font></td>
</tr>
</tbody>
</table>
<pre class="code"><strong><font size="3" face="Arial">HierarchyId Data Type</font></strong></pre>
<div id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum1">   1:</span> --<span style="color:#0000ff;">Create</span> <span style="color:#0000ff;">Table</span> Employee</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum2">   2:</span> <span style="color:#0000ff;">CREATE</span> <span style="color:#0000ff;">TABLE</span> Employee</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum3">   3:</span> (</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum4">   4:</span> EmpId <span style="color:#0000ff;">int</span>,</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum5">   5:</span> EmpBossId HIERARCHYID,</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum6">   6:</span> --GetLevel --&gt; <span style="color:#0000ff;">returns</span> the <span style="color:#0000ff;">level</span> <span style="color:#0000ff;">of</span> the <span style="color:#0000ff;">current</span> node <span style="color:#0000ff;">in</span> the hierarchy</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum7">   7:</span> EmpLevel <span style="color:#0000ff;">as</span> EmpBossId.GetLevel() PERSISTED,</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum8">   8:</span> EmpCode <span style="color:#0000ff;">varchar</span>(50),</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum9">   9:</span> EmpName <span style="color:#0000ff;">varchar</span>(50)</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum10">  10:</span> );</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum11">  11:</span> <span style="color:#0000ff;">Go</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum12">  12:</span> <span style="color:#008000;">-- Create Insert Store Procedure</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum13">  13:</span> <span style="color:#0000ff;">Alter</span> <span style="color:#0000ff;">PROCEDURE</span> Employee_isp</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum14">  14:</span>     @empid <span style="color:#0000ff;">int</span>,</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum15">  15:</span>     @empbossid <span style="color:#0000ff;">int</span>,</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum16">  16:</span>     @empcode <span style="color:#0000ff;">varchar</span>(50),</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum17">  17:</span>     @empname <span style="color:#0000ff;">varchar</span>(50)</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum18">  18:</span> <span style="color:#0000ff;">AS</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum19">  19:</span> <span style="color:#0000ff;">BEGIN</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum20">  20:</span> <span style="color:#0000ff;">declare</span> @hid HIERARCHYID,@empboss_hid HIERARCHYID,@last_hid HIERARCHYID</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum21">  21:</span>&#160; </font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum22">  22:</span> <span style="color:#0000ff;">if</span> @empbossid = 0 </font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum23">  23:</span> <span style="color:#0000ff;">begin</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum24">  24:</span>     <span style="color:#0000ff;">set</span> @hid = HIERARCHYID::GetRoot();</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum25">  25:</span> <span style="color:#0000ff;">end</span> </font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum26">  26:</span> <span style="color:#0000ff;">else</span> </font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum27">  27:</span> <span style="color:#0000ff;">begin</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum28">  28:</span>   </font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum29">  29:</span>   <span style="color:#0000ff;">SET</span> @empboss_hid = (<span style="color:#0000ff;">SELECT</span> EmpBossId <span style="color:#0000ff;">FROM</span> Employee  <span style="color:#0000ff;">WHERE</span> empid = @empbossid);</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum30">  30:</span>   <span style="color:#0000ff;">SET</span> @last_hid = (<span style="color:#0000ff;">SELECT</span> <span style="color:#0000ff;">MAX</span>(EmpBossId) <span style="color:#0000ff;">FROM</span> Employee <span style="color:#0000ff;">WHERE</span> EmpBossId.GetAncestor(1)= @empboss_hid);</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum31">  31:</span>   <span style="color:#0000ff;">SET</span> @hid = @empboss_hid.GetDescendant(@last_hid, <span style="color:#0000ff;">NULL</span>);</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum32">  32:</span> <span style="color:#0000ff;">end</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum33">  33:</span> INSERT <span style="color:#0000ff;">INTO</span> Employee(empid, EmpBossId, EmpCode, EmpName)</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum34">  34:</span>             <span style="color:#0000ff;">VALUES</span>(@empid, @hid, @empcode, @empname);</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum35">  35:</span> <span style="color:#0000ff;">END</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum36">  36:</span> <span style="color:#0000ff;">GO</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum37">  37:</span> --insert <span style="color:#0000ff;">data</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum38">  38:</span> <span style="color:#008000;">--                     A1</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum39">  39:</span> <span style="color:#008000;">--                AL1           AR1</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum40">  40:</span> <span style="color:#008000;">--           AL1L     AL1R  AR1L   AR1R  </span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum41">  41:</span> <span style="color:#008000;">--</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum42">  42:</span> <span style="color:#008000;">--</span></font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum43">  43:</span> <span style="color:#0000ff;">EXEC</span> Employee_isp @empid =  1, @empbossid = 0, @empcode = <span style="color:#006080;">'A1'</span> ,@empname = <span style="color:#006080;">'A1'</span>;</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum44">  44:</span> <span style="color:#0000ff;">EXEC</span> Employee_isp @empid =  2, @empbossid = 1, @empcode = <span style="color:#006080;">'AL1'</span> ,@empname = <span style="color:#006080;">'AL1'</span>;</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum45">  45:</span> <span style="color:#0000ff;">EXEC</span> Employee_isp @empid =  3, @empbossid = 1, @empcode = <span style="color:#006080;">'AR1'</span> ,@empname = <span style="color:#006080;">'AR1'</span>;</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum46">  46:</span> <span style="color:#0000ff;">EXEC</span> Employee_isp @empid =  4, @empbossid = 2, @empcode = <span style="color:#006080;">'AL1L'</span> ,@empname = <span style="color:#006080;">'AL1L'</span>;</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum47">  47:</span> <span style="color:#0000ff;">EXEC</span> Employee_isp @empid =  5, @empbossid = 2, @empcode = <span style="color:#006080;">'AL1R'</span> ,@empname = <span style="color:#006080;">'AL1R'</span>;</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum48">  48:</span> <span style="color:#0000ff;">EXEC</span> Employee_isp @empid =  6, @empbossid = 3, @empcode = <span style="color:#006080;">'AR1L'</span> ,@empname = <span style="color:#006080;">'AR1L'</span>;</font></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="3"><font face="ar"><span style="color:#606060;" id="lnum49">  49:</span> <span style="color:#0000ff;">EXEC</span> Employee_isp @empid =  7, @empbossid = 3, @empcode = <span style="color:#006080;">'AR1R'</span> ,@empname = <span style="color:#006080;">'AR1R'</span>;</font></font></pre>
<p><!--CRLF--></div>
</div>
<pre class="code"><strong><font size="3" face="ar"></font></strong></pre>
<pre class="code"><strong><font size="3" face="ar">Inserted Data Into Table </font></strong></pre>
<pre class="code"><a href="http://amitpatriwala.files.wordpress.com/2009/10/hierarchyid.jpg"><font size="3" face="ar"><img style="display:inline;border-width:0;" title="HIERARCHYID" border="0" alt="HIERARCHYID" src="http://amitpatriwala.files.wordpress.com/2009/10/hierarchyid_thumb.jpg?w=644&#038;h=232" width="644" height="232" /></font></a><font size="3" face="ar"> </font></pre>
<pre class="code"><strong><font size="3" face="ar">Different Selection Criteria :</font></strong></pre>
<pre class="code"><strong><font size="3" face="ar">1) Find Employee As Per their Level means Grade </font></strong></pre>
<pre class="code"><font size="3"><font face="ar"><span style="color:blue;">   select </span><span style="color:gray;">* </span><span style="color:blue;">from </span>Employee <span style="color:blue;">where </span>Emplevel <span style="color:gray;">= </span>2</font></font></pre>
<pre class="code"><font size="3" face="ar">2) Get Child Node </font></pre>
<div align="center">
<pre class="code"><font size="3"><font face="ar"><span style="color:blue;">   SELECT </span>Child<span style="color:gray;">.</span>empid<span style="color:gray;">, </span>Child<span style="color:gray;">.</span>empname <span style="color:blue;">FROM </span>Employee <span style="color:blue;">AS </span>Parent <span style="color:gray;">JOIN </span>Employee <span style="color:blue;">AS </span>Child
          <span style="color:blue;">ON </span>Parent<span style="color:gray;">.</span>empid <span style="color:gray;">= </span>2 <span style="color:gray;">AND </span>child<span style="color:gray;">.</span>empbossid<span style="color:gray;">.</span>IsDescendantOf<span style="color:gray;">(</span>Parent<span style="color:gray;">.</span>empbossid<span style="color:gray;">) = </span>1<span style="color:gray;">;</span></font></font></pre>
</div>
<div align="left">
<pre class="code"><span style="color:gray;"><font size="3" face="ar">3) Get Parent Node</font></span></pre>
</div>
<pre class="code"><font size="3"><font face="ar"><span style="color:blue;">SELECT </span>parent<span style="color:gray;">.</span>empid<span style="color:gray;">, </span>parent<span style="color:gray;">.</span>empname
<span style="color:blue;">  FROM </span>Employee <span style="color:blue;">AS </span>Parent <span style="color:gray;">JOIN </span>Employee <span style="color:blue;">AS </span>Child
    <span style="color:blue;">ON </span>child<span style="color:gray;">.</span>empid <span style="color:gray;">= </span>4 <span style="color:gray;">AND </span>child<span style="color:gray;">.</span>empbossid<span style="color:gray;">.</span>IsDescendantOf<span style="color:gray;">(</span>Parent<span style="color:gray;">.</span>empbossid<span style="color:gray;">) = </span>1<span style="color:gray;">;</span></font></font></pre>
<pre class="code"><font color="#000000" size="3" face="Times New Roman"><span style="color:black;"><strong>more on HierarchyId Data Types refer:</strong></span></font></pre>
<pre class="code"><font size="3" face="Times New Roman"><a title="http://amitpatriwala.wordpress.com/2009/10/23/hierarchyid-data-type/" href="http://amitpatriwala.wordpress.com/2009/10/23/hierarchyid-data-type/" target="_blank">http://amitpatriwala.wordpress.com/2009/10/23/hierarchyid-data-type/</a></font></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><strong><font size="3" face="Arial"><strong><font size="3" face="ar">5) Introduced New Functions</font></strong></font></strong></pre>
<table border="1" cellspacing="0" cellpadding="2" width="472">
<tbody>
<tr>
<td valign="top" width="139"><font size="3">Function Name</font></td>
<td valign="top" width="331"><font size="3">Function Use</font></td>
</tr>
<tr>
<td valign="top" width="139"><font size="3">SYSDATETIME</font></td>
<td valign="top" width="331"><font size="3">Returns current date and time as <strong>DateTime2</strong> value. </font></td>
</tr>
<tr>
<td valign="top" width="139"><font size="3">SYSUTCDATETIME</font></td>
<td valign="top" width="331"><font size="3">Returns current date and time in UTC as <strong>DateTime2</strong> value</font></td>
</tr>
<tr>
<td valign="top" width="139"><font size="3">SYSDATETIMEOFFSET</font></td>
<td valign="top" width="331"><font size="3">Returns current date and time along with the system time zone as a DATETIMEOFFSET value</font></td>
</tr>
<tr>
<td valign="top" width="139"><font size="3">SWITCHOFFSET</font></td>
<td valign="top" width="331"><font size="3">Adjusts an input DATETIMEOFFSET value to a specified time zone, while preserving the UTC value. </font></p>
<p><font size="3">For example, the following code adjusts the current system datetimeoffset value to time zone GMT +05:00: </font></p>
<p><strong><font size="3">SELECT SWITCHOFFSET(SYSDATETIMEOFFSET(), &#8216;-05:00&#8242;);</font></strong></p>
</td>
</tr>
<tr>
<td valign="top" width="139"><font size="3">TODATETIMEOFFSET</font></td>
<td valign="top" width="331"><font size="3">sets the time zone offset of an input date and time value</font></td>
</tr>
</tbody>
</table>
<pre class="code"><strong><font size="3" face="Arial"><strong><font size="3" face="ar">6) Support Large User Define Types [UDT]</font></strong></font></strong></pre>
<pre class="code"><font size="3"><font face="ar"><strong>Sql Server 2008 supports large UDT,large UDTs can now reach up to </strong><strong>2 GB in size.</strong></font></font></pre>
<pre class="code"><font size="3" face="ar">&#160;</font></pre>
<pre class="code"><strong><font size="3" face="ar">Reference Sites: </font></strong></pre>
<pre class="code"><a title="http://technet.microsoft.com/en-us/library/cc721270.aspx" href="http://technet.microsoft.com/en-us/library/cc721270.aspx" target="_blank"><font size="3" face="ar">http://technet.microsoft.com/en-us/library/cc721270.aspx</font></a></pre>
<p><font size="3" face="ar"></font></p>
<p><font size="3" face="ar"></font></p>
<p><font size="3" face="ar"></font></p>
<p><font size="3" face="ar"></font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/479/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=479&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2009/10/23/sql-server-2008-feature-part1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>

		<media:content url="http://amitpatriwala.files.wordpress.com/2009/10/hierarchyid_thumb.jpg" medium="image">
			<media:title type="html">HIERARCHYID</media:title>
		</media:content>
	</item>
		<item>
		<title>URL rewriting in asp.net</title>
		<link>http://amitpatriwala.wordpress.com/2009/10/02/url-rewriting-in-asp-net/</link>
		<comments>http://amitpatriwala.wordpress.com/2009/10/02/url-rewriting-in-asp-net/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 13:28:13 +0000</pubDate>
		<dc:creator>patriwala</dc:creator>
				<category><![CDATA[Asp.Net 2.0]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[BrowserFile in asp.net]]></category>
		<category><![CDATA[ControlAdapter]]></category>
		<category><![CDATA[Handling ASP.NET PostBacks with URL Rewriting]]></category>
		<category><![CDATA[IHttpModule]]></category>
		<category><![CDATA[Rewrite URL in asp.net]]></category>
		<category><![CDATA[Use of BrowserFile.browser in asp.net]]></category>
		<category><![CDATA[what is URL rewriting ?]]></category>
		<category><![CDATA[why URL rewriting?]]></category>

		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/2009/10/02/url-rewriting-in-asp-net/</guid>
		<description><![CDATA[what is URL rewriting ? URL rewriting is the process of intercepting an incoming Web request and redirecting the request to a different resource. When performing URL rewriting, typically the URL being requested is checked and, based on its value, the request is redirected to a different URL. http://msdn.microsoft.com/en-us/library/ms972974.aspx&#160; why URL rewriting? 1) Make User [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=474&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><font size="2">what is URL rewriting ?</font></strong></p>
<p><font size="2">URL rewriting is the process of intercepting an incoming Web request and redirecting the request to a different resource. When performing URL rewriting, typically the URL being requested is checked and, based on its value, the request is redirected to a different URL.</font></p>
<p><a title="http://msdn.microsoft.com/en-us/library/ms972974.aspx" href="http://msdn.microsoft.com/en-us/library/ms972974.aspx" target="_blank"><font size="2">http://msdn.microsoft.com/en-us/library/ms972974.aspx</font></a><font size="2">&#160;</font></p>
<p><strong><font size="2">why URL rewriting?</font></strong></p>
<p><font size="2">1) Make User Friendly and Secure URL</font></p>
<p><font size="2">Example :&#160; In your application, you create a page which display category information and it’s relevant category. At that time we normally passing a value via query string,</font></p>
<p><a href="http://Site.com/category.aspx?categoryid=1" target="_blank"><font size="2">http://Site.com/category.aspx?categoryid=1</font></a><font size="2">. Any user play with URL, you can also do the URL Encryption. but sometime case is complex at that time it is not possible.</font></p>
<p><font size="2">2) Make SEO Friendly URL</font></p>
<p><font size="2">3) Usability &amp; Maintainability</font></p>
<p><strong><font size="2">Use Of Browser file?</font></strong></p>
<p><font size="2">ASP.NET uses .browser files to determine the capabilities of the browser, and how to render markup to that browser.</font></p>
<p><font size="2">Browser files are used to reduce the load of the page made by the view state by storing it in a server side session variable.</font></p>
<p><font size="2">In particular Rewriting Module: <strong>Handling Post back with URL Rewriting.</strong></font></p>
<p><strong><font size="2">what is ControlAdapter?</font></strong></p>
<p><strong><font size="2">for more detail please check :</font></strong></p>
<h6><a title="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter.aspx" href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter.aspx" target="_blank"><font size="2">http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter.aspx</font></a></h6>
<p><font size="2">Create demo project for URL Rewriting:</font></p>
<p><font size="2">Step 1: </font></p>
<p><font size="2">Create Web application with (Asp.net 2.0 with c#)</font></p>
<p><font size="2">Step 2:</font></p>
<p><font size="2">Put two button in the form (default.aspx)</font></p>
<p><font size="2">Put Below code for Button1_Click Event :</font></p>
<p><font size="2">Response.Redirect(&quot;Default.aspx?id=1&quot;);</font></p>
<p><font size="2">Put Below code for Button2 _Click Event:</font></p>
<p><font size="2">Response.Redirect(&quot;/urlrewriting/FirstSection/Default.html&quot;);</font></p>
<p><font size="2">Step 3: Run Application</font></p>
<p><font size="2">once you press Button2 it give Error page.</font></p>
<p><font size="2">Step 4: </font></p>
<p><font size="2">Create Class FormRewriterControlAdapter.cs</font></p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#39;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">using</span> System;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum2">   2:</span> <span style="color:#0000ff;">using</span> System.Data;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum3">   3:</span> <span style="color:#0000ff;">using</span> System.Configuration;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum4">   4:</span> <span style="color:#0000ff;">using</span> System.Web;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum5">   5:</span> <span style="color:#0000ff;">using</span> System.Web.Security;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum6">   6:</span> <span style="color:#0000ff;">using</span> System.Web.UI;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum7">   7:</span> <span style="color:#0000ff;">using</span> System.Web.UI.WebControls;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum8">   8:</span> <span style="color:#0000ff;">using</span> System.Web.UI.WebControls.WebParts;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum9">   9:</span> <span style="color:#0000ff;">using</span> System.Web.UI.HtmlControls;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum10">  10:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum11">  11:</span> <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> FormRewriterControlAdapter : System.Web.UI.Adapters.ControlAdapter</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum12">  12:</span> {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum13">  13:</span>     <span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">override</span> <span style="color:#0000ff;">void</span> Render(HtmlTextWriter writer)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum14">  14:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum15">  15:</span>         <span style="color:#0000ff;">base</span>.Render(<span style="color:#0000ff;">new</span> RewriteFormHtmlTextWriter(writer));</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum16">  16:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum17">  17:</span> }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum18">  18:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum19">  19:</span> <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> RewriteFormHtmlTextWriter : HtmlTextWriter</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum20">  20:</span> {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum21">  21:</span>     <span style="color:#0000ff;">public</span> RewriteFormHtmlTextWriter(HtmlTextWriter writer)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum22">  22:</span>         : <span style="color:#0000ff;">base</span>(writer)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum23">  23:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum24">  24:</span>         <span style="color:#0000ff;">this</span>.InnerWriter = writer.InnerWriter;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum25">  25:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum26">  26:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum27">  27:</span>     <span style="color:#0000ff;">public</span> RewriteFormHtmlTextWriter(System.IO.TextWriter writer)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum28">  28:</span>         : <span style="color:#0000ff;">base</span>(writer)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum29">  29:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum30">  30:</span>         <span style="color:#0000ff;">base</span>.InnerWriter = writer;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum31">  31:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum32">  32:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum33">  33:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">override</span> <span style="color:#0000ff;">void</span> WriteAttribute(<span style="color:#0000ff;">string</span> name, <span style="color:#0000ff;">string</span> <span style="color:#0000ff;">value</span>, <span style="color:#0000ff;">bool</span> fEncode)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum34">  34:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum35">  35:</span>         <span style="color:#0000ff;">if</span> (name == <span style="color:#006080;">&quot;action&quot;</span>)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum36">  36:</span>         {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum37">  37:</span>             HttpContext Context = HttpContext.Current;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum38">  38:</span>             <span style="color:#0000ff;">if</span> (Context.Items[<span style="color:#006080;">&quot;ActionAlreadyWritten&quot;</span>] == <span style="color:#0000ff;">null</span>)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum39">  39:</span>             {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum40">  40:</span>                 <span style="color:#0000ff;">value</span> = Context.Request.RawUrl;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum41">  41:</span>                 Context.Items[<span style="color:#006080;">&quot;ActionAlreadyWritten&quot;</span>] = <span style="color:#0000ff;">true</span>;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum42">  42:</span>             }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum43">  43:</span>         }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum44">  44:</span>         <span style="color:#0000ff;">base</span>.WriteAttribute(name, <span style="color:#0000ff;">value</span>, fEncode);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum45">  45:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum46">  46:</span> } </font></pre>
<p><!--CRLF--></div>
</div>
<p><font size="2">&#160;</font></p>
<p><font size="2">Create Class MyHttpHandler.cs</font></p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#39;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">using</span> System;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum2">   2:</span> <span style="color:#0000ff;">using</span> System.Data;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum3">   3:</span> <span style="color:#0000ff;">using</span> System.Configuration;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum4">   4:</span> <span style="color:#0000ff;">using</span> System.Web;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum5">   5:</span> <span style="color:#0000ff;">using</span> System.Web.Security;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum6">   6:</span> <span style="color:#0000ff;">using</span> System.Web.UI;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum7">   7:</span> <span style="color:#0000ff;">using</span> System.Web.UI.WebControls;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum8">   8:</span> <span style="color:#0000ff;">using</span> System.Web.UI.WebControls.WebParts;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum9">   9:</span> <span style="color:#0000ff;">using</span> System.Web.UI.HtmlControls;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum10">  10:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum11">  11:</span> <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> MyHttpHandler : IHttpModule</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum12">  12:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum13">  13:</span> {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum14">  14:</span>     <span style="color:#0000ff;">public</span> MyHttpHandler()</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum15">  15:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum16">  16:</span>         <span style="color:#008000;">//</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum17">  17:</span>         <span style="color:#008000;">// TODO: Add constructor logic here</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum18">  18:</span>         <span style="color:#008000;">//</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum19">  19:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum20">  20:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum21">  21:</span>     <span style="color:#cc6633;">#region</span> IHttpModule Members</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum22">  22:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum23">  23:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> Dispose()</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum24">  24:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum25">  25:</span>        </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum26">  26:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum27">  27:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum28">  28:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> Init(HttpApplication app)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum29">  29:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum30">  30:</span>         app.BeginRequest += <span style="color:#0000ff;">new</span> EventHandler(Application_BeginRequest);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum31">  31:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum32">  32:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum33">  33:</span>     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> Application_BeginRequest(<span style="color:#0000ff;">object</span> sender, EventArgs e)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum34">  34:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum35">  35:</span>         System.Web.HttpApplication app = (System.Web.HttpApplication)sender;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum36">  36:</span>         <span style="color:#0000ff;">string</span> requestedUrl = app.Request.Path.ToLower();</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum37">  37:</span>         <span style="color:#0000ff;">string</span> realUrl = GetRealUrl(requestedUrl);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum38">  38:</span>         <span style="color:#0000ff;">if</span> (!String.IsNullOrEmpty(realUrl))</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum39">  39:</span>             app.Context.RewritePath(realUrl, <span style="color:#0000ff;">false</span>);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum40">  40:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum41">  41:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum42">  42:</span>     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">string</span> GetRealUrl(<span style="color:#0000ff;">string</span> requestedUrl)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum43">  43:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum44">  44:</span>         <span style="color:#008000;">// Implement your own logic here</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum45">  45:</span>         MyURL obj = <span style="color:#0000ff;">new</span> MyURL();</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum46">  46:</span>         <span style="color:#0000ff;">return</span> obj.GetRealPath(requestedUrl);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum47">  47:</span>     } </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum48">  48:</span>     <span style="color:#cc6633;">#endregion</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum49">  49:</span> }</font></pre>
<p><!--CRLF--></div>
</div>
<p><font size="2">&#160;</font></p>
<p><font size="2">create Class MyURL.cs</font></p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#39;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum1">   1:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum2">   2:</span> <span style="color:#0000ff;">using</span> System;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum3">   3:</span> <span style="color:#0000ff;">using</span> System.Data;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum4">   4:</span> <span style="color:#0000ff;">using</span> System.Configuration;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum5">   5:</span> <span style="color:#0000ff;">using</span> System.Web;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum6">   6:</span> <span style="color:#0000ff;">using</span> System.Web.Security;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum7">   7:</span> <span style="color:#0000ff;">using</span> System.Web.UI;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum8">   8:</span> <span style="color:#0000ff;">using</span> System.Web.UI.WebControls;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum9">   9:</span> <span style="color:#0000ff;">using</span> System.Web.UI.WebControls.WebParts;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum10">  10:</span> <span style="color:#0000ff;">using</span> System.Web.UI.HtmlControls;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum11">  11:</span> <span style="color:#0000ff;">using</span> System.Collections.Generic;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum12">  12:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum13">  13:</span> <span style="color:#008000;">/// &lt;summary&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum14">  14:</span> <span style="color:#008000;">/// Summary description for MyURL</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum15">  15:</span> <span style="color:#008000;">/// &lt;/summary&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum16">  16:</span> <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> MyURL</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum17">  17:</span> {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum18">  18:</span>     <span style="color:#0000ff;">public</span> MyURL()</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum19">  19:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum20">  20:</span>         <span style="color:#008000;">//</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum21">  21:</span>         <span style="color:#008000;">// TODO: Add constructor logic here</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum22">  22:</span>         <span style="color:#008000;">//</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum23">  23:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum24">  24:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum25">  25:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> GetRealPath(<span style="color:#0000ff;">string</span> requestedUrl)</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum26">  26:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum27">  27:</span>         <span style="color:#0000ff;">string</span> path = <span style="color:#006080;">&quot;&quot;</span>;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum28">  28:</span>         Dictionary&lt;<span style="color:#0000ff;">string</span>, <span style="color:#0000ff;">string</span>&gt; paths = GetPathsFromDatabase();</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum29">  29:</span>         <span style="color:#0000ff;">if</span> (paths.ContainsKey(requestedUrl))</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum30">  30:</span>             paths.TryGetValue(requestedUrl, <span style="color:#0000ff;">out</span> path);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum31">  31:</span>         <span style="color:#0000ff;">return</span> path;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum32">  32:</span>     }</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum33">  33:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum34">  34:</span>     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> Dictionary&lt;<span style="color:#0000ff;">string</span>, <span style="color:#0000ff;">string</span>&gt; GetPathsFromDatabase()</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum35">  35:</span>     {</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum36">  36:</span>         Dictionary&lt;<span style="color:#0000ff;">string</span>, <span style="color:#0000ff;">string</span>&gt; paths = <span style="color:#0000ff;">new</span> Dictionary&lt;<span style="color:#0000ff;">string</span>, <span style="color:#0000ff;">string</span>&gt;();</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum37">  37:</span>         paths.Add(<span style="color:#006080;">&quot;/urlrewriting/FirstSection/Default.html&quot;</span>.ToLower(), <span style="color:#006080;">&quot;/urlrewriting/Default.aspx?SectionID=1&quot;</span>);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum38">  38:</span>         paths.Add(<span style="color:#006080;">&quot;/urlrewriting/SecondSection/Default.aspx&quot;</span>.ToLower(), <span style="color:#006080;">&quot;/urlrewriting/Default.aspx?SectionID=2&quot;</span>);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum39">  39:</span>         paths.Add(<span style="color:#006080;">&quot;/urlrewriting/FirstSection/Page1.aspx&quot;</span>.ToLower(), <span style="color:#006080;">&quot;/urlrewriting/Default.aspx?SectionID=1&amp;Item=1&quot;</span>);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum40">  40:</span>         paths.Add(<span style="color:#006080;">&quot;/urlrewriting/FirstSection/Page2.aspx&quot;</span>.ToLower(), <span style="color:#006080;">&quot;/urlrewriting/Default.aspx?SectionID=1&amp;Item=2&quot;</span>);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum41">  41:</span>         paths.Add(<span style="color:#006080;">&quot;/urlrewriting/SecondSection/Page1.aspx&quot;</span>.ToLower(), <span style="color:#006080;">&quot;/urlrewriting/Default.aspx?SectionID=2&amp;Item=1&quot;</span>);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum42">  42:</span>         paths.Add(<span style="color:#006080;">&quot;/urlrewriting/SecondSection/SubSection/AnotherOne/Page5.aspx&quot;</span>.ToLower(), <span style="color:#006080;">&quot;/urlrewriting/Default.aspx?SectionID=2&amp;Item=5&quot;</span>);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum43">  43:</span>         paths.Add(<span style="color:#006080;">&quot;/urlrewriting/Default.aspx&quot;</span>.ToLower(), <span style="color:#006080;">&quot;/urlrewriting/Default.aspx&quot;</span>);</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum44">  44:</span>         <span style="color:#0000ff;">return</span> paths;</font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum45">  45:</span>     } </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum46">  46:</span> }</font></pre>
<p><!--CRLF--></div>
</div>
<p><font size="2">Register Http Handler in to Web.Config </font></p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#39;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">system.web</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum2">   2:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">httpModules</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum3">   3:</span>             <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">add</span> <span style="color:#ff0000;">name</span><span style="color:#0000ff;">=&quot;MyHttpHandler&quot;</span> <span style="color:#ff0000;">type</span><span style="color:#0000ff;">=&quot;MyHttpHandler&quot;</span><span style="color:#0000ff;">/&gt;</span></font></pre>
<p><!--CRLF--></div>
</div>
<p><font size="2">.Browser File</font></p>
<p><font size="2">Add New .browser file from Add New Item.</font></p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#39;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">browsers</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum2">   2:</span>     <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">browser</span> <span style="color:#ff0000;">id</span><span style="color:#0000ff;">=&quot;NewBrowser&quot;</span> <span style="color:#ff0000;">parentID</span><span style="color:#0000ff;">=&quot;Mozilla&quot;</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum3">   3:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">identification</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum4">   4:</span>             <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">userAgent</span> <span style="color:#ff0000;">match</span><span style="color:#0000ff;">=&quot;Unique User Agent Regular Expression&quot;</span> <span style="color:#0000ff;">/&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum5">   5:</span>         <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">identification</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum6">   6:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum7">   7:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">capture</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum8">   8:</span>             <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">userAgent</span> <span style="color:#ff0000;">match</span><span style="color:#0000ff;">=&quot;NewBrowser (?'version'\d+\.\d+)&quot;</span> <span style="color:#0000ff;">/&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum9">   9:</span>         <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">capture</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum10">  10:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum11">  11:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">capabilities</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum12">  12:</span>             <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">capability</span> <span style="color:#ff0000;">name</span><span style="color:#0000ff;">=&quot;browser&quot;</span> <span style="color:#ff0000;">value</span><span style="color:#0000ff;">=&quot;My New Browser&quot;</span> <span style="color:#0000ff;">/&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum13">  13:</span>             <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">capability</span> <span style="color:#ff0000;">name</span><span style="color:#0000ff;">=&quot;version&quot;</span> <span style="color:#ff0000;">value</span><span style="color:#0000ff;">=&quot;${version}&quot;</span> <span style="color:#0000ff;">/&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum14">  14:</span>         <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">capabilities</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum15">  15:</span>     <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">browser</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum16">  16:</span>&#160; </font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum17">  17:</span>     <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">browser</span> <span style="color:#ff0000;">refID</span><span style="color:#0000ff;">=&quot;Mozilla&quot;</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum18">  18:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">capabilities</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum19">  19:</span>             <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">capability</span> <span style="color:#ff0000;">name</span><span style="color:#0000ff;">=&quot;xml&quot;</span> <span style="color:#ff0000;">value</span><span style="color:#0000ff;">=&quot;true&quot;</span> <span style="color:#0000ff;">/&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum20">  20:</span>         <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">capabilities</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum21">  21:</span>     <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">browser</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum22">  22:</span> <span style="color:#008000;">&lt;!--FormRewrite Control Adapter--&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum23">  23:</span>     <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">browser</span> <span style="color:#ff0000;">refID</span><span style="color:#0000ff;">=&quot;Default&quot;</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum24">  24:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">controlAdapters</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum25">  25:</span>             <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">adapter</span> <span style="color:#ff0000;">controlType</span><span style="color:#0000ff;">=&quot;System.Web.UI.HtmlControls.HtmlForm&quot;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum26">  26:</span>                 <span style="color:#ff0000;">adapterType</span><span style="color:#0000ff;">=&quot;FormRewriterControlAdapter&quot;</span> <span style="color:#0000ff;">/&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum27">  27:</span>         <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">controlAdapters</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum28">  28:</span>     <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">browser</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#39;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><font size="2"><span style="color:#606060;" id="lnum29">  29:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">browsers</span><span style="color:#0000ff;">&gt;</span></font></pre>
<p><!--CRLF--></div>
</div>
<p><font size="2">step 5: Run Application</font></p>
<p><font size="2">Now Press Button 2: </font></p>
<p><a title="http://localhost:2696/urlrewriting/FirstSection/Default.html" href="http://localhost:2696/urlrewriting/FirstSection/Default.html"><font size="2">http://localhost:2696/urlrewriting/FirstSection/Default.html</font></a><font size="2"> and it is run.</font></p>
<p><font size="2">&#160;</font></p>
<p><font size="2">Now made some change in to system. Remove browser file and click button2, after that made postback at that time above URL is change to original URL.</font></p>
<p><font size="2">Reference Site :</font></p>
<p><font size="2">For Detail Example :</font></p>
<p><a title="http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx" href="http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx" target="_blank"><font size="2">http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx</font></a></p>
<p><font size="2">&#160;</font></p>
<p><font size="2">Hope this help you.</font></p>
<p><font size="2">Thnx</font></p>
<p><font size="2">&#160;</font></p>
<p><font size="2"></font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amitpatriwala.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amitpatriwala.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amitpatriwala.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amitpatriwala.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/amitpatriwala.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/amitpatriwala.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/amitpatriwala.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/amitpatriwala.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amitpatriwala.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amitpatriwala.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amitpatriwala.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amitpatriwala.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amitpatriwala.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amitpatriwala.wordpress.com/474/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amitpatriwala.wordpress.com&amp;blog=2616360&amp;post=474&amp;subd=amitpatriwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://amitpatriwala.wordpress.com/2009/10/02/url-rewriting-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c12ba624e5155b632d14a31227425a46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">patriwala</media:title>
		</media:content>
	</item>
	</channel>
</rss>
