<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2447833955317506069</id><updated>2012-01-28T09:48:51.646+05:30</updated><category term='Cryptography'/><category term='B&apos;day'/><category term='Performance'/><category term='Code Review'/><category term='ASP.Net 2.0'/><category term='HttpHandlers'/><category term='Javascript'/><category term='Cross Browser'/><category term='SSRS'/><category term='SQL Server'/><category term='HTML'/><category term='Learn'/><category term='Debug'/><category term='VB.Net'/><category term='VS2005'/><category term='Security'/><category term='ADO.Net 2.0'/><category term='SSIS'/><category term='Tutorials'/><category term='Ajax'/><category term='Configuration'/><category term='C Sharp'/><title type='text'>asithangae</title><subtitle type='html'>Dev in a Learning EDGE...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>55</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-5600258427843342408</id><published>2012-01-28T09:48:00.001+05:30</published><updated>2012-01-28T09:48:51.848+05:30</updated><title type='text'>Assigning values to SQL variable using Select Query</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;Assigning a value to SQL variable: &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;Declare&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt; @date &lt;span style="color: blue;"&gt;Datetime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;set&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt; @date &lt;span style="color: grey;"&gt;=&lt;/span&gt;&lt;span style="color: magenta;"&gt;getdate&lt;/span&gt;&lt;span style="color: grey;"&gt;()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;We can achieve the same using simple select statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;select&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt; @date &lt;span style="color: grey;"&gt;=&lt;/span&gt;&lt;span style="color: magenta;"&gt;getdate&lt;/span&gt;&lt;span style="color: grey;"&gt;()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;If we try to do the same from a result of query, thenit will be &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;select&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt; @date &lt;span style="color: grey;"&gt;=&lt;/span&gt;DateCreated &lt;span style="color: blue;"&gt;from&lt;/span&gt; SomeTable &lt;span style="color: blue;"&gt;where&lt;/span&gt; PrimaryKey &lt;span style="color: grey;"&gt;=&lt;/span&gt;SomeValue&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;We are sure that this query will return only one record, sothis statement is valid and always returns expected result. In a scenario,where the result is more than one then which value will be assigned to thatvariable. Will it be first record or last record or anything in between?&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;declare&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt; @empid &lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;8&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;select&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt; &lt;span style="color: blue;"&gt;top&lt;/span&gt;10 @empid &lt;span style="color: grey;"&gt;=&lt;/span&gt; empid &lt;span style="color: blue;"&gt;from&lt;/span&gt;Empmaster &lt;span style="color: blue;"&gt;where&lt;/span&gt; DeptID &lt;span style="color: grey;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;'A'&lt;/span&gt; &lt;span style="color: blue;"&gt;order&lt;/span&gt; &lt;span style="color: blue;"&gt;by&lt;/span&gt; empid&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;select&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt; &lt;span style="color: blue;"&gt;top&lt;/span&gt;10 &lt;span style="color: grey;"&gt;*&lt;/span&gt; &lt;span style="color: blue;"&gt;from&lt;/span&gt;Empmaster &lt;span style="color: blue;"&gt;where&lt;/span&gt; DeptID &lt;span style="color: grey;"&gt;=&lt;/span&gt;&lt;span style="color: red;"&gt;'A'&lt;/span&gt; &lt;span style="color: blue;"&gt;order&lt;/span&gt; &lt;span style="color: blue;"&gt;by&lt;/span&gt; empid&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;select&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt; @empid&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;It will always get assigned to the last result data. So tobe on the safe side we need to put the order by clause and use the appropriateorder as ascending or desending considering the fact it always pull the lastrecord. Otherwise we need to use the “Top 1” so it always use the value of firstrecord in the result with proper sorting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-5600258427843342408?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/5600258427843342408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=5600258427843342408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5600258427843342408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5600258427843342408'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2012/01/assigning-values-to-sql-variable-using.html' title='Assigning values to SQL variable using Select Query'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-7854448347536323944</id><published>2012-01-23T22:51:00.000+05:30</published><updated>2012-01-25T11:44:50.344+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Handling Ajax Asynchronous Post Back Error</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;I read this solution in one of the article, just want to share the same.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;1. We can handle ajax errors from client side by adding a custom handler to end_request event of PageRequestManager object.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;2. We can handle this by binding a error handler method to property OnAsyncPostBackError of S&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;cript manager object.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Client side handling:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;script type&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="str" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: maroon; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;"text/javascript"&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; language&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="str" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: maroon; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;"javascript"&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="typ" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: #2b91af; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;Sys&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="typ" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: #2b91af; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;WebForms&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="typ" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: #2b91af; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;PageRequestManager&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;getInstance&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;().&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;add_endRequest&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class="typ" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: #2b91af; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;EndRequestHandler&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-color: white; line-height: 13.5pt;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background: white; line-height: 13.5pt; vertical-align: baseline;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;span class="pln" style="font-size: 10.5pt;"&gt;function &lt;/span&gt;&lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: #2b91af; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;EndRequestHandler&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;sender&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; args&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;br /&gt;&lt;span class="pln"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: darkblue; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;args&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;get_error&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;!=&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; undefined&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;br /&gt;&lt;span class="pln"&gt;  &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: darkblue; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; errorMessage&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;    i&lt;/span&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: darkblue; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;f&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;args&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;get_response&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;().&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;get_statusCode&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;==&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="str"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: maroon; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;'200'&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;br /&gt;&lt;span class="pln"&gt;  &amp;nbsp;   errorMessage &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; args&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;get_error&lt;/span&gt;&lt;span class="pun"&gt;().&lt;/span&gt;&lt;span class="pln"&gt;message&lt;/span&gt;&lt;span class="pun"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="pln"&gt;&amp;nbsp;   &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="pln"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: darkblue; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;br /&gt;&lt;span class="pln"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span class="com"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: grey; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;// Error occurred somewhere other than the server page.&lt;/span&gt;&lt;/span&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;br /&gt;&lt;span class="pln"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; errorMessage &lt;/span&gt;&lt;span class="pun"&gt;=&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="str"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: maroon; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;'An unspecified error occurred. '&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;span class="pln"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="pln"&gt;  &amp;nbsp; args&lt;/span&gt;&lt;span class="pun"&gt;.&lt;/span&gt;&lt;span class="pln"&gt;set_errorHandled&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; color: darkblue; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;span class="pln"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="pun"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="pun"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="pln"&gt;script&lt;/span&gt;&lt;span class="pun"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: white; line-height: 13.5pt; vertical-align: baseline;"&gt;&lt;span style="border-bottom-color: windowtext; border-bottom-style: none; border-bottom-width: 1pt; border-image: initial; border-left-color: windowtext; border-left-style: none; border-left-width: 1pt; border-right-color: windowtext; border-right-style: none; border-right-width: 1pt; border-top-color: windowtext; border-top-style: none; border-top-width: 1pt; font-size: 10.5pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;"&gt;&lt;span class="pun"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: white; line-height: 13.5pt; vertical-align: baseline;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Server side handling:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: white; line-height: 13.5pt; vertical-align: baseline;"&gt;&lt;span style="background-color: white; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 13.5pt;"&gt;&amp;lt;asp:ScriptManager ID=&lt;/span&gt;&lt;span style="background-color: white; color: #a31515; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 13.5pt;"&gt;"ScriptManager1"&lt;/span&gt;&lt;span style="background-color: white; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 13.5pt;"&gt; runat=&lt;/span&gt;&lt;span style="background-color: white; color: #a31515; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 13.5pt;"&gt;"server"&lt;/span&gt;&lt;span style="background-color: white; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 13.5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 13.5pt;"&gt;OnAsyncPostBackError=&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #a31515; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 13.5pt;"&gt;"ScriptManager1_AsyncPostBackError"&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 13.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: white; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 13.5pt;"&gt;&amp;lt;/asp:ScriptManager&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; vertical-align: baseline;"&gt;&lt;span style="background-color: white; font-family: 'Courier New', Courier, monospace; font-size: x-small; line-height: 18px;"&gt;protected void ScriptManager1_AsyncPostBackError(object sender, AsyncPostBackErrorEventArgs e){&lt;br /&gt;  if (e.Exception.Data["ExtraInfo"] != null){&lt;br /&gt;    ScriptManager1.AsyncPostBackErrorMessage = e.Exception.Message + e.Exception.Data["ExtraInfo"].ToString();&lt;br /&gt;  }&lt;br /&gt;  else{&lt;br /&gt;    ScriptManager1.AsyncPostBackErrorMessage = "An unspecified error occurred."&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-7854448347536323944?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/7854448347536323944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=7854448347536323944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7854448347536323944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7854448347536323944'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2012/01/handling-ajax-asynchronous-post-back.html' title='Handling Ajax Asynchronous Post Back Error'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6848088372420012328</id><published>2011-11-29T21:45:00.001+05:30</published><updated>2011-11-30T00:35:05.337+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Cross Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Invoking mouse events through JavaScript</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;&lt;u&gt;Handling Mouse Events through Java script&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In some scenarios, we may need to invoke a button click through script. We can write &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;element.click()&lt;/span&gt;, but that will not work in all the browsers. We may need to do this in another way, please check the below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;function invokeSaveClick(saveElementId) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; var e = document.createEvent('MouseEvents');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; e.initEvent('click', true, true);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; document.getElementById(saveElementId).dispatchEvent(e);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6848088372420012328?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6848088372420012328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6848088372420012328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6848088372420012328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6848088372420012328'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2011/11/invoking-mouse-events-through.html' title='Invoking mouse events through JavaScript'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-3964746252241585176</id><published>2011-11-29T00:44:00.001+05:30</published><updated>2011-11-29T00:54:55.206+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Request.ApplicationPath is not working in some cases</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Request.ApplicationPath&lt;/span&gt; will work only IE. When we want to support different browsers like Chrome, Safari and Firefox, we should use the below property to get the correct relative URL.&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;this.Request.Url.GetLeftPart(UriPartial.Authority)&lt;/span&gt;&lt;/blockquote&gt;Example:&lt;br /&gt;&lt;br /&gt;If we use &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Request.ApplicationPath&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;window.open('" + Request.ApplicationPath + "/abc/testpage.aspx?x=1"','test page', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes ,modal=yes'); }", true);&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;It will be rendered as &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http://abc/testpage.aspx?x=&lt;/span&gt;1&lt;br /&gt;&lt;br /&gt;If we use&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Request.Url.GetLeftPart(UriPartial.Authority), &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;then it will be rendered as&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http://ServerName/abc/testpage.aspx?x=1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-3964746252241585176?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/3964746252241585176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=3964746252241585176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3964746252241585176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3964746252241585176'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2011/11/requestapplicationpath-is-not-working.html' title='Request.ApplicationPath is not working in some cases'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-112311169211392380</id><published>2011-10-03T14:42:00.001+05:30</published><updated>2011-11-30T00:33:46.380+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>View State Issues in ASP.Net</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;We are getting some of the view state related errors in our application.&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Invalid view state.&lt;/li&gt;&lt;li&gt;Unable to read beyond the end of the stream.&lt;/li&gt;&lt;li&gt;The serialized data is invalid.&lt;/li&gt;&lt;li&gt;The client disconnected.&lt;/li&gt;&lt;/ul&gt;The reason for this errors are one of the one mentioned below:&lt;br /&gt;&lt;br /&gt;1. The application may be deployed across farms and the encryption/Decryption keys may vary in the servers, so it may throw errors&amp;nbsp;intermittently.&lt;br /&gt;2. The View state may be very large or bloated, so it may reduce the application performance and may cause issue while serialization or deserialization of View state.&lt;br /&gt;&lt;br /&gt;Possible solution for this issue are,&lt;br /&gt;&lt;br /&gt;1. We can set the encryption validation key at the application level in the web.config file. It looks like the one mentioned below.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #cc0000; font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;machinekey decryption="AES" decryptionkey="4C05D6B56FA0A057F519884A1C3B5B42B14491ED56CB44F942EE3A0CA2848D29" validation="SHA1" validationkey="ABFD56FE84823AE69E9A613CE998803F4246FE0D96DC48E7BB9E715B0A57352CEFB35264EFB8C0F710E154F42B7460B7CDE9A99F225DA796DEE5E5F94F8F7188"&amp;gt;&amp;lt;/machinekey&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #990000; font-size: 12px; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We can generate keys online from this location.&amp;nbsp;&lt;a href="http://aspnetresources.com/tools/machineKey"&gt;http://aspnetresources.com/tools/machineKey&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #cc0000; font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;pages enableviewstatemac="true"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We can also set the enableViewStateMac to true, but we have some issues when we implement the both these fixes. It may throw user a run time error or&amp;nbsp;compiler warning. It will not allow you to debug sometimes.&lt;br /&gt;&lt;br /&gt;3. Other simple solution to overcome this issue is to break the view state in to multiple chunks so that we can avoid the serialization error. This can be&amp;nbsp;achieved&amp;nbsp;by setting a simple property in the pages element of config file.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #990000; font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;&amp;lt;pages maxpagestatefieldlength="20"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #990000; font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;4. We can also compress and decompress the view state using a simple logic and have that code in the Base Page of the application. We can use compression at the page level by setting a property. Please check the code project link for a detailed explanation on this.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/viewstate/ViewStateCompression.aspx"&gt;http://www.codeproject.com/KB/viewstate/ViewStateCompression.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;These are some of the things I found during my search, i put all the points in one stop for your reference. It worked for me. Hope the same for you all.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-112311169211392380?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/112311169211392380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=112311169211392380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/112311169211392380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/112311169211392380'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2011/10/view-state-issues-in-aspnet.html' title='View State Issues in ASP.Net'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-1796826573590276568</id><published>2011-09-26T19:04:00.000+05:30</published><updated>2011-09-26T19:05:01.155+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Blind SQL Injection</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;SQL Injection can be avoided using HTML encoding.&amp;nbsp;Please find the list of characters which needs to be handled which getting user inputs especially in multi-line text boxes.&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[1] | (pipe sign)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[2] &amp;amp; (ampersand sign)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[3] ; (semicolon sign)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[4] $ (dollar sign)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[5] % (percent sign)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[6] @ (at sign)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[7] ' (single apostrophe)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[8] " (quotation mark)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[9] \' (backslash-escaped apostrophe)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[10] \" (backslash-escaped quotation mark)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[11] &amp;lt;&amp;gt; (triangular parenthesis)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[12] () (parenthesis)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[13] + (plus sign)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[14] CR (Carriage return, ASCII 0x0d)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[15] LF (Line feed, ASCII 0x0a)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[16] , (comma sign)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;[17] \ (backslash)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span style="color: black; font-family: &amp;quot;MS Shell Dlg 2&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'MS Shell Dlg 2', sans-serif;"&gt;Their is always a chance of manupulating the SQL script as part of form inputs and also end user can prepare a request dynamically and hit the target url's. If we use the HTML encode and decode this can be avoided.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'MS Shell Dlg 2', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'MS Shell Dlg 2', sans-serif;"&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'MS Shell Dlg 2', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'MS Shell Dlg 2', sans-serif;"&gt;While getting the input values from the form and before processing that.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;string data = HTTPUtility.HTMLEncode(Textbox1.Text)&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'MS Shell Dlg 2', sans-serif;"&gt;While rendering the data to UI&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Textbox1.Text = HTTPUtility.HTMLDecode(data)&lt;/span&gt;&lt;/div&gt;This is simple and one of the best practice to avoid SQL injection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -.25in;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -.25in;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-1796826573590276568?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/1796826573590276568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=1796826573590276568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/1796826573590276568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/1796826573590276568'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2011/09/blind-sql-injection.html' title='Blind SQL Injection'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-8127943493336485675</id><published>2011-04-12T15:39:00.000+05:30</published><updated>2011-04-12T15:46:19.785+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Review'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Cross Site Scripting : Validating Query string parameters string</title><content type='html'>1. We need to validate the request by setting the ValidateRequest="true" on the @ Pages element.&lt;br /&gt;&lt;br /&gt;2. We need to take care while using query string parameter. We need to cast the query string value to the respective data type to avoid this. Please check the below code snippet to avoid this. This will help us to check whether user end is manipulating something in the URL, if so then we cannot create a new GUID the catch block will be executed and generic error message will display. the same logic can be applied for any data type.&lt;br /&gt;&lt;blockquote&gt;try&lt;br /&gt;{&lt;br /&gt;  string Key = Request.QueryString["e"];&lt;br /&gt;  Guid ErrorGUID = new Guid(Key);&lt;br /&gt;  lblError.Text = string.Format("Please provide the following error code &lt;b&gt;{0}&lt;/b&gt;.", ErrorGUID.ToString();&lt;br /&gt;}&lt;br /&gt;catch ()&lt;br /&gt;{&lt;br /&gt;  //handle exceptions accordingy&lt;br /&gt;}&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-8127943493336485675?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/8127943493336485675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=8127943493336485675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/8127943493336485675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/8127943493336485675'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2011/04/cross-site-scripting-validating-query.html' title='Cross Site Scripting : Validating Query string parameters string'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6275077066194064524</id><published>2011-03-11T15:16:00.000+05:30</published><updated>2011-03-11T16:09:38.952+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SSIS Error code DTS_E_OLEDBError 0X8004005 ...</title><content type='html'>&lt;span style="font-weight:bold;"&gt;SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;sometimes we get as "Login failed for user" or "User might not have permission to do the activity".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I was getting this error for quite sometime when I execute the package using "Execute Package utility" I tried looking this msdn site for &lt;a href="http://msdn.microsoft.com/en-us/library/ms141747.aspx"protection level for pacakges&gt;&lt;/a&gt;, but that does not help. Even though i changed the settings and try to execute it is prompting the same error.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Reason&lt;/span&gt;: At last i got the solution from this &lt;a href="http://blogs.msdn.com/b/dataaccesstechnologies/archive/2009/11/09/ssis-error-code-dts-e-oledberror-an-ole-db-error-has-occurred-reasons-and-troubleshooting.aspx"&gt;msdn blog&lt;/a&gt; (which also contains solution for different kinds of SSIS errors). While setting the DB connection, I check the save password check box to avoid entering multiple times. That is reason for it. Normally if we have to set the password permanently for the connection then we are suppose to set the password for package also. And also the package encryption level must be set to "EncryptSensitiveWithPassword" or "EncryptAllWithPassword". This both go in pair. If you set the encryption level and not setting the package password it will throw an error.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Solution:&lt;/span&gt; &lt;br /&gt;1. While setting the connection details, we should not check the Save Password option and package encryption can be default. As a best practice, we can set the package configurations through config file. &lt;br /&gt;&lt;br /&gt;Reference for package configurations in &lt;a href="http://technet.microsoft.com/en-us/library/ms140213.aspx"&gt;msdn site&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Prerequisite: &lt;/span&gt;&lt;br /&gt;1. Make sure you have the latest version of BIDS.&lt;br /&gt;2. Update the SQL server with all available service packs.&lt;br /&gt;3. While setting the connection string using config file, please make sure you are setting the connection provider also.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6275077066194064524?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6275077066194064524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6275077066194064524' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6275077066194064524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6275077066194064524'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2011/03/ssis-error-code-dtseoledberror.html' title='SSIS Error code DTS_E_OLEDBError 0X8004005 ...'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-2583790813440615518</id><published>2011-03-10T16:59:00.001+05:30</published><updated>2011-03-10T17:21:53.037+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS2005'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Migration from VS 2005 to VS 2008</title><content type='html'>I recently got a opportunity to migrate a VS2005 project to VS2008. I was reading all the pros and cons of migration from the different sites. The simple thing to migrate the solution is open the 2005 solution from the VS 2008 IDE, it opens a wizard and take you through each step and convert the whole project. After migration it creates a Migration report which tell the status of migration. 99% of the project gets migrated in one click. Some of the solution will have a problem. If you get a chance to compare the sln file before and after migration the only change you can find is mentioned below:&lt;br /&gt;&lt;br /&gt;VS2005 sln file: Microsoft Visual Studio Solution File, Format Version 9.00&lt;br /&gt;VS2008 sln file: Microsoft Visual Studio Solution File, Format Version 10.00&lt;br /&gt;&lt;br /&gt;The project files (*.vbproj or *.csproj) will not be affected or modified during the migration.&lt;br /&gt;&lt;br /&gt;One more way to do this is create a Blank solution in VS2008 and start adding vs2005 projects to it. If we have multiple projects, then it will be little tedious to add each and every project.&lt;br /&gt;&lt;br /&gt;We have a constraint here. If you solution has SSRS or SSIS projects associated to that then it will not get migrated on its own. We need to migrate it separately. While doing this we should make sure the SQL versions is also upgrated to SQL Server 2008. It is simple in development machine, but while deploying if the environment does not support then we will be in trouble. But for Window and Web projects, we will not find any problem until we change the framework. VS2008 supports multi-targeting, I mean it supports to compile and run your project in different framework starting from Net Framework 2.0.&lt;br /&gt;&lt;br /&gt;One more funniest thing is we can have two sln files for same project to work in two different VS versions. This will not affect the project until you do not change the target framework. This is not a best practice, but helps in critical situations.&lt;br /&gt;&lt;br /&gt;I referred the below &lt;a href="http://blogs.msdn.com/b/djpark/archive/2007/11/07/how-to-use-solutions-and-projects-between-visual-studio-2005-and-2008.aspx"&gt;link&lt;/a&gt; to know more information before migrating the project. This is really worth reading even for knowledge sake.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-2583790813440615518?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/2583790813440615518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=2583790813440615518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2583790813440615518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2583790813440615518'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2011/03/migration-from-vs-2005-to-vs-2008.html' title='Migration from VS 2005 to VS 2008'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-5623130757389747225</id><published>2011-03-10T16:22:00.000+05:30</published><updated>2011-03-10T16:58:21.742+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='VS2005'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Business Intelligence Development Studio  2005 (BIDS)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-mNMFOrobR_M/TXizDW6zoyI/AAAAAAAAIc4/KVhBIs-FkPc/s1600/VS.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 188px;" src="http://3.bp.blogspot.com/-mNMFOrobR_M/TXizDW6zoyI/AAAAAAAAIc4/KVhBIs-FkPc/s320/VS.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5582408608398943010" /&gt;&lt;/a&gt;&lt;br /&gt;I recently want to update visual studio 2005 with service pack. The moment i installed in my machine, my studio started behaving very funny. IDE is having repeated menu items with repeated sub menu. I tried repair the studio with reinstalling the service pack and the problem is still more worse. Menus got doubled than before. I tried setting the IDE using Import and Export setting and that does not help. All I need is BIDS and not full version of VS2005 as my projects are migrated to higher versions. So I uninstall the VS2005 from my machine. I uninstall Visual Studio Premier Partner Edition also (by mistake), Please do not uninstall that as it is required for BIDS. &lt;br /&gt;&lt;br /&gt;I have SQL Server 2005 database services installed already in my machine, and I downloaded the latest version of service pack for &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b953e84f-9307-405e-bceb-47bd345baece"&gt;Microsoft SQL Server 2005 (Service Pack 4 RTM)&lt;/a&gt; and installed in my machine. During the installation wizard there is a option to select the tool which you want to upgrade, select all and proceed.&lt;br /&gt;&lt;br /&gt;Installation went well with one fix failed, and it opened the provisioning tool to set the access for my SQL server database engine. Once the installation is done, IDE started configuring on its own and it ready.  I got this information in one of the site mentioned below. But still I want to post the full history to understand the history behind this.&lt;br /&gt;&lt;br /&gt;Info I found in that &lt;a href="http://anildesai.net/index.php/2007/12/visual-studio-2008-business-intelligence-development-studio-troubleshooting/"&gt;site&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;You should make sure that Visual Studio is still installed. If you didn’t previously have VS installed, the BI Dev Studio installation will install a VS shell called Visual Studio Premier Partner Edition. Look in Add or Remove Programs for an entry like this. If you don’t find any entry for Visual Studio go to the location for SQL Server setup and run .\Tools\Setup\vs_setup.exe. This will install the VS Shell. After this is installed repair the BI Studio installation by running the following from the command line from the .\Tools directory: start /wait setup.exe /qb REINSTALL=SQL_WarehouseDevWorkbench REINSTALLMODE=OMUS&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-5623130757389747225?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/5623130757389747225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=5623130757389747225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5623130757389747225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5623130757389747225'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2011/03/business-intelligence-development.html' title='Business Intelligence Development Studio  2005 (BIDS)'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-mNMFOrobR_M/TXizDW6zoyI/AAAAAAAAIc4/KVhBIs-FkPc/s72-c/VS.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6483333510811079989</id><published>2011-02-17T16:12:00.001+05:30</published><updated>2011-02-18T16:03:40.023+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>SSRS sub report not visible while rendering</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;We need to verify the Hidden property in the visibility section and make sure it is said to false (hidden=false). Remove the expression and try hardcoded values like true or false. Make sure all the parameters defined in the sub report are properly associated in the main report. One of the reasons is if the sub report is having dataset associated to it and the dataset is not returning a single record will be a problem. Otherwise the record may contains all null values. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6483333510811079989?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6483333510811079989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6483333510811079989' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6483333510811079989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6483333510811079989'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2011/02/ssrs-sub-report-not-visible-while.html' title='SSRS sub report not visible while rendering'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-8452081399413004315</id><published>2010-06-05T22:33:00.000+05:30</published><updated>2010-06-05T22:39:38.138+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>SQL SERVER 2005 Uninstalation issue ( Error code : 2147024893)</title><content type='html'>Error : The setup failed to read IIsMimeMap table. The error code is -2147024893.&lt;br /&gt;&lt;br /&gt;Description :  we get this error when we try to uninstall the reporting services individually or SQL server 2005 as a whole package. the reason for this selecting the mixed mode for authentication while installation. even the microsoft does not have the solution for this.&lt;br /&gt;&lt;br /&gt;Workaround for this is ...&lt;br /&gt;1. Uninstall the IIS &lt;br /&gt;2. Uninstall the SQL server 2005 or reporting services. &lt;br /&gt;&lt;br /&gt;Happy Coding :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-8452081399413004315?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/8452081399413004315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=8452081399413004315' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/8452081399413004315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/8452081399413004315'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2010/06/sql-server-2005-uninstalation-issue.html' title='SQL SERVER 2005 Uninstalation issue ( Error code : 2147024893)'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-7815993893554180081</id><published>2009-06-19T12:07:00.000+05:30</published><updated>2009-10-21T12:10:30.317+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>ADGroup Verification in ASP.NET Web Applications</title><content type='html'>Normally in Enterprise level , users will be provided access at the ADGroup level for the application that are hosted at the intranet and internet. The web application will contains the access related code. There are two to check this access at ADGroup.&lt;br /&gt;1. LDAP QUERY&lt;br /&gt;2. Net inbuilt method&lt;br /&gt;&lt;br /&gt;The  first one LDAP approach is more time consumable. Also to add more value, we will be using a service account to pull the Active Directory information. This is risk, we are pulling firm sensitive data from the Active Directory. Moreover to check a single ADGroup, we are pulling all the existing and verifying it via loop. This is a bad practice. And causes Performance issues.&lt;br /&gt;&lt;br /&gt;The Dotnet inbuilt function IsInRole is simplest way to achieve this. we need to know the domain name where the ADGroup is in place. The syntax for this goes like this.&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt;bool IsHavingAccess = HttpContext.Current.User.Identity.IsInRole(domain\Adgroup);&lt;/blockquote&gt;&lt;br /&gt; &lt;br /&gt;This will help us to just verify the access security and provide the result. So by using this method, we are nowhere pulling sensitive information and logic will be very fast. Hope this helps.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://anyurl.com" rel="tag"&gt;CodeProject&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-7815993893554180081?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/7815993893554180081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=7815993893554180081' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7815993893554180081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7815993893554180081'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2009/06/adgroup-verification-in-aspnet-web.html' title='ADGroup Verification in ASP.NET Web Applications'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-3954598931950078303</id><published>2009-06-07T17:44:00.000+05:30</published><updated>2011-11-30T00:33:30.486+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Cross Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Dynamically assign a function to event in javascript</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In javascript, using code we can assign function to the events of the elements.&lt;br /&gt;&lt;br /&gt;In general, we can assign the function name to the event name directly, Please see the below example.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var element = document.getElementById("testElement");&lt;br /&gt;element.onclick = DynamicFunction;&lt;br /&gt;&lt;br /&gt;function DynamicFunction()&lt;br /&gt;{&lt;br /&gt; alert("sample function");&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Consider a scenario where you have to assign a function with parameters. we cannot do in the below mentioned way. this will throw a script error. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var element = document.getElementById("testElement");&lt;br /&gt;element.onclick = DynamicFunctionWithParameters(x,y);&lt;br /&gt;&lt;br /&gt;function DynamicFunctionWithParameters(param1, param2)&lt;br /&gt;{&lt;br /&gt; alert("sample function");&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;we have to go with a round about way to achieve the same, see the  below example.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var element = document.getElementById("testElement");&lt;br /&gt;element.onclick = function(x,y){DynamicFunctionWithParameters(x,y);};&lt;br /&gt;&lt;br /&gt;function DynamicFunctionWithParameters(param1, param2)&lt;br /&gt;{&lt;br /&gt; alert("sample function");&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I think you know, we can even directly write the function instead writing it separately and assigning it to the event later. the below example explains this. while mentioning this way we cannot have the function name, and also the same function cannot not be reused.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var element = document.getElementById("testElement");&lt;br /&gt;element.onclick = function(param1, param2)&lt;br /&gt;{&lt;br /&gt; alert("sample function");&lt;br /&gt;};&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-3954598931950078303?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/3954598931950078303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=3954598931950078303' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3954598931950078303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3954598931950078303'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2009/06/dynamically-assign-function-to-event-in.html' title='Dynamically assign a function to event in javascript'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-9157542415049424166</id><published>2009-04-13T18:03:00.001+05:30</published><updated>2011-11-30T00:34:15.699+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>HttpContext is Null</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span xmlns=""&gt;&lt;/span&gt;&lt;br /&gt;&lt;span xmlns=""&gt;In ASP.Net application, HttpContext type will be instantiated for current thread and it loads all the context values related to the Request sent to the server. While we use the Asynchronous concept in the ASP.Net application, the HTTPContext will not have a reference or values in the asynchronous thread. Apart from the normal Page execution thread, new threads will be created for every Async task we are using, So while referring those Context objects Care should be taken. Otherwise the application will throw error. &lt;/span&gt;&lt;br /&gt;&lt;span xmlns=""&gt;HttpContext.Current object will be null, when we are using Asynchronous task [PageAsyncTask].&lt;/span&gt;&lt;br /&gt;&lt;span xmlns=""&gt;To avoid this or overcome this, capture the needed values from the base thread and share it with a static class to the other threads. This capturing of values should happen before the invoking of Async Calls.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-9157542415049424166?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/9157542415049424166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=9157542415049424166' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/9157542415049424166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/9157542415049424166'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2009/04/httpcontext-is-null.html' title='HttpContext is Null'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6336233934099564151</id><published>2008-05-08T17:30:00.000+05:30</published><updated>2008-05-08T17:42:48.668+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Learn'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Mime Content Types for office 2007 documents</title><content type='html'>The Content Type of the office 2007 files are different from the normal office documents. the files are strored and maintained internally as xml formats. While uploading these documents they are uploaded in octet stream[binary stream]. &lt;br /&gt;For more details check this link. &lt;a href="http://www.openxmldeveloper.org/"&gt;openxmldeveloper.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Content Types of the office 2007 files is listed below.&lt;br /&gt;&lt;br /&gt;&lt;table cellspacing="0" cellpadding="0" border="1"&gt;&lt;tr style="font-weight:bold;"&gt;&lt;td align="center" width="30%"&gt;File Extension&lt;/td&gt;&lt;td style="padding:5px;" width="70%"&gt;Content Type&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;docm&lt;/td&gt;&lt;td&gt;application/vnd.ms-word.document.macroEnabled.12 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;docx&lt;/td&gt;&lt;td&gt;application/vnd.openxmlformats-officedocument.wordprocessingml.document &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;dotm&lt;/td&gt;&lt;td&gt;application/vnd.ms-word.template.macroEnabled.12 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;dotx&lt;/td&gt;&lt;td&gt;application/vnd.openxmlformats-officedocument.wordprocessingml.template &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppsm&lt;/td&gt;&lt;td&gt;application/vnd.ms-powerpoint.slideshow.macroEnabled.12 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ppsx&lt;/td&gt;&lt;td&gt;application/vnd.openxmlformats-officedocument.presentationml.slideshow &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pptm&lt;/td&gt;&lt;td&gt;application/vnd.ms-powerpoint.presentation.macroEnabled.12 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;pptx&lt;/td&gt;&lt;td&gt;application/vnd.openxmlformats-officedocument.presentationml.presentation &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;xlsb&lt;/td&gt;&lt;td&gt;application/vnd.ms-excel.sheet.binary.macroEnabled.12 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;xlsm&lt;/td&gt;&lt;td&gt;application/vnd.ms-excel.sheet.macroEnabled.12 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;xlsx&lt;/td&gt;&lt;td&gt;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;xps&lt;/td&gt;&lt;td&gt;application/vnd.ms-xpsdocument &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6336233934099564151?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6336233934099564151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6336233934099564151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6336233934099564151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6336233934099564151'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/05/mime-content-types-for-office-2007.html' title='Mime Content Types for office 2007 documents'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-7303774463726465182</id><published>2008-05-07T13:37:00.001+05:30</published><updated>2008-05-07T13:48:19.899+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Manual verification of Validation Controls before getting submitted using Javascript</title><content type='html'>The Validation controls plays a major role in validation client data before it is getting posted in to the server. This is done by placing the appropriate validation controls required. This takes care of data validation before posting on its own. Suppose this same task has to handle even when validation controls are present. Let us see this. &lt;br /&gt;A JavaScript function displayed below will takes care of a similar task. &lt;br /&gt;&lt;pre&gt;function VerifyValidators()&lt;br /&gt;{&lt;br /&gt;    //To verify the validators are passed in data validation.&lt;br /&gt;    //This Page_ClientValidate() function will return true if all the validation are passed else it returns false.&lt;br /&gt;    if (Page_ClientValidate() == true)&lt;br /&gt;    { &lt;br /&gt;        form1.submit();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;The Page_ClientValidate() function will not be included in the page by default. To implement this function we need a minimum a single validation control. Then, this function is rendered as a part of any validation control by default. By using this function, we can check the Data Validation even before it gets posted to the server. Some times when using this functionality the page may not be posted to the server, then page has to be submitted to the server manually as given in the function or in any other way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-7303774463726465182?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/7303774463726465182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=7303774463726465182' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7303774463726465182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7303774463726465182'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/05/manual-verification-of-validation.html' title='Manual verification of Validation Controls before getting submitted using Javascript'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6295389465026066392</id><published>2008-04-23T16:51:00.000+05:30</published><updated>2008-04-23T16:57:04.408+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>ViewState Vs ControlState</title><content type='html'>we all know, in asp.net 1.x the web controls use the Viewstate to maintain state between postbacks. this involves more data to be transfered from and to the server. the best practice is to disbale ViewState when it is not required, but still this is problem in many other cases, suppose we use the DataGrid controls, which consumes most of the ViewState normally, the ViewState cannot be disabled because it has to support other events related to that control. the DataGrid page number, event command are stored in the Viewstate, so this is more inconvinient.&lt;br /&gt;In Asp.Net 2.0, the Viewstate concept is changed and they have introduced the controlstate, which is a part of Viewstate, only for the purpose to maintain control state, not the content of it. Control state is another type of hidden state reserved exclusively for controls to maintain their core behavioral functionality, whereas view state only contains state to maintain the control's contents (UI). Technically, control state is stored in the same hidden field as view state (being just another leaf node at the end of the view state hierarchy), but if you disable view state on a particular control, or on an entire page, the control state is still propagated. this enables us to use more Web Controls, as the viewstate is maintained internally. this will not support DataGrid, because it is part of Asp.Net 1.x, the new controls of Asp.Net 2.0 will support this feature. even the viewstate is disabled the event triggered, other control properties are maintained in the controls state. &lt;br /&gt;&lt;br /&gt;The supported controls are listed below.&lt;br /&gt;&lt;strong&gt;Control -&gt; Properties Stored in Control State &lt;/strong&gt;&lt;br /&gt;CheckBoxList  -&gt; PreviousItemCount, PreviousOffset &lt;br /&gt;ContentPager  -&gt; CurrentPage, PageCount &lt;br /&gt;DetailsView  -&gt; PageIndex, Mode, DefaultMode &lt;br /&gt;FormView  -&gt; PageIndex, Mode, DefaultMode &lt;br /&gt;GridView  -&gt; EditIndex, SelectedIndex, PageIndex, SortDirection, SortExpression &lt;br /&gt;ListControl  -&gt; SelectedIndices&lt;br /&gt;(base class for BulletedList, CheckBoxList, DropDownList, ListBox, and RadioButtonList)&lt;br /&gt;LoginView  -&gt; TemplateIndex &lt;br /&gt;MultiView  -&gt; ActiveViewIndex &lt;br /&gt;Table   -&gt; CurrentRow, ViewMode&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6295389465026066392?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6295389465026066392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6295389465026066392' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6295389465026066392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6295389465026066392'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/04/viewstate-vs-controlstate.html' title='ViewState Vs ControlState'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-5391886061887805962</id><published>2008-03-22T12:36:00.000+05:30</published><updated>2008-03-22T12:38:10.694+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Partial Classes</title><content type='html'>Partial Classes allow user to split the class file accross multiple source files. The benifit behind this approach is to hide the funtionality of the class. the same class can be created in may places and appropriate methods can be placed in the code file so that it derived classes can focus on significant part alone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-5391886061887805962?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/5391886061887805962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=5391886061887805962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5391886061887805962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5391886061887805962'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/03/partial-classes.html' title='Partial Classes'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-4722077611570932829</id><published>2008-03-22T12:34:00.001+05:30</published><updated>2011-02-17T16:15:11.795+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><title type='text'>Interfaces</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;Interface are a type similar to class, where it cannot have the Method Content, rather it has the definition of Method. It will not have properties and members variables. The class which inherits the interface should implement all the methods of the interface. The interface forces the derived class to implement; otherwise it will not get compiled. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;The below lists some of common interfaces of .Net &lt;br/&gt;1. IComparable - Implemented by types whose value can be ordered, it is used for sorting. &lt;br/&gt;2. Idisposable - Defines this method to dispose of an object manually, this is important most commonly used Interface when dealing with more big objects, and also to release the object which holds the resource like database. &lt;br/&gt;3. IConvertible - Enables the class to base type such as string, int or bool. &lt;br/&gt;4. IClonable - Supports object copying &lt;br/&gt;5. IEquatable - Allows comparing to object instances. &lt;br/&gt;6. IFormatable - Provides way to convert the value of object into a formatted string. This is similar to ToString() method, but provides greater flexibility than it.&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-4722077611570932829?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/4722077611570932829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=4722077611570932829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/4722077611570932829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/4722077611570932829'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/03/interfaces_22.html' title='Interfaces'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-5144062470239613919</id><published>2008-03-22T12:34:00.000+05:30</published><updated>2008-03-22T12:36:06.351+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><title type='text'>Interfaces</title><content type='html'>Interface are a type similar to class, where it cannot have the Method Content, rather it has the definition of Method. it will not have properies and members variables. the class which inherits the interface should implement all the methods of the interface. the interface forces the derived class to implement, otherwise it will not get compiled. The below lists ome of common interfaces of .Net&lt;br /&gt; 1. IComparable  - Implemented by ttypes whose value can be ordered, it is ued for sorting.&lt;br /&gt; 2. Idisposable  - Defines this method to dispose of a object manually, this is important most commonly used Interface when dealing with more big objects, and also to release the object which holds the resource like database.&lt;br /&gt; 3. IConvertible  - Enables the class to to base type such as string, int or bool.&lt;br /&gt; 4. IClonable  - Supports object copying&lt;br /&gt; 5. IEquatable  - Allows to compare to object instances.&lt;br /&gt; 6. IFormatable  - Provides way to convert the value of object into an formatted string. This is similar to ToString() method, but provides greater flexibility than it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-5144062470239613919?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/5144062470239613919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=5144062470239613919' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5144062470239613919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5144062470239613919'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/03/interfaces.html' title='Interfaces'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-951127007561754965</id><published>2008-03-22T12:33:00.000+05:30</published><updated>2008-03-22T12:34:30.432+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><title type='text'>Nullable type in .Net 2.0</title><content type='html'>Nullable type allows a varible to store null value, Infact this is the special about the type. The main purpose is it will add two members to the variable HasValue and Value Members. for example, if you store data for a yes/no question and if the user did not answer the question then null will be stored in that place. This means it stores True, False and third state nothing as null also. This will be represented as shown below.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; In VB.Net,&lt;br /&gt;  Dim b as Nullable(Of Boolean) = Nothing&lt;br /&gt;  .....&lt;br /&gt;  If b.HasValue Then &lt;br /&gt;  Do if b has some value and not null&lt;br /&gt;  Else &lt;br /&gt;  Do if b is null&lt;br /&gt;  End If&lt;br /&gt; In C#,&lt;br /&gt;  Nullable&lt;bool&gt; b = null;&lt;br /&gt;  Otherwise it can be used this way also, only applicable for C#, &lt;br /&gt;  bool? b = null;&lt;br /&gt;  .....&lt;br /&gt;  if (b.HasValue) {Do if it is not null} else {Do if it null}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-951127007561754965?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/951127007561754965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=951127007561754965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/951127007561754965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/951127007561754965'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/03/nullable-type-in-net-20.html' title='Nullable type in .Net 2.0'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-1591192828380061017</id><published>2008-03-22T12:29:00.000+05:30</published><updated>2008-03-22T12:33:01.247+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Optimizing performance with built-in types .Net</title><content type='html'>The runtime optimizes the performance of 32-bit integer types (Int32 and UInt32), so use those types for counters and other frequently accessed integral variables. For floating-point operations, Double is the most efficient type because those operations are optimized by hardware.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-1591192828380061017?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/1591192828380061017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=1591192828380061017' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/1591192828380061017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/1591192828380061017'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/03/optimizing-performance-with-built-in.html' title='Optimizing performance with built-in types .Net'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-613051761838099240</id><published>2008-03-20T17:17:00.000+05:30</published><updated>2008-03-20T17:27:16.390+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Learn'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>ImageMap Control - ASP.Net 2.0</title><content type='html'>ImageMap is a New WebControl of ASP.Net 2.0. this is similar to the age old HTML control Map. This enables to set regions in a single image, and also sets a actions for that region. Means, if the region is clicked it will navigate to some other page or site, submits the page. A region can be created in Rectangle, polygan or in circle. The syntax is shown below with a Example.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;asp:ImageMap ID="ImageMap1" runat="server" HotSpotMode="PostBack" ImageUrl="~/Images/spaces.gif" OnClick="ImageMap1_Click" &amp;gt;&lt;br /&gt;        &amp;lt;asp:CircleHotSpot Radius="30" PostBackValue="Circle" AccessKey="c" AlternateText="some text"  HotSpotMode="PostBack" &lt;br /&gt;                NavigateUrl="~/Trial.aspx"  TabIndex="1" Target="_blank"/&amp;gt;&lt;br /&gt;        &amp;lt;asp:PolygonHotSpot Coordinates="0,0;0,30;30,30;30,0;" PostBackValue="Polygon"   /&amp;gt;&lt;br /&gt;        &amp;lt;asp:RectangleHotSpot Bottom="20" Right="20" PostBackValue="Rectangle"  /&amp;gt;&lt;br /&gt;&amp;lt;/asp:ImageMap&amp;gt;&lt;br /&gt;&lt;br /&gt;protected void ImageMap1_Click(object sender, ImageMapEventArgs e)&lt;br /&gt;{&lt;br /&gt; Response.Write(e.PostBackValue.ToString());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The Properties used in the controls are listed:&lt;br /&gt;&lt;br /&gt; PostBackValue - this value can be retrived by the EventArgs of ImageMap Click Event(e.PostBackValue).&lt;br /&gt; AccessKey - combination alt + Specified Key makes the event triggered.&lt;br /&gt; AlternateText - text in the region specified if image is not available.&lt;br /&gt; HotSpotMode - decides the behavior of the event, listed below are the description of this Mode&lt;br /&gt; &gt; NotSet - No HotSpot set&lt;br /&gt; &gt; Inactive - Region set and restricted to stop firing the event.&lt;br /&gt; &gt; Navigate - Navigates to the url set by the NavigateUrl property.&lt;br /&gt; &gt; PostBack - Submits the page with PostBackValue set, triggers the Click Event.&lt;br /&gt; NavigateUrl - set to get navigated to the specified URL Value, when triggered.&lt;br /&gt; Target - Open the redirected url in specified target(Like same window or new window).&lt;br /&gt;&lt;br /&gt;Image Map supports three types of region specification. Apart from the properties, the HotSpot region specifies will have a shape oriented property like Circle has radius, x and y; Rectangle has top, left, bottom and right; polygan has coordinates. a single Image map can have any no. of HotSpot's in any combinations. if same region is mention twice then the priority goes for the first specified one. the HotSpot is basically a collection, all these propeties can be set by design mode also using Property Window.&lt;br /&gt;&lt;br /&gt;The HotSpotMode can be set in Imagemap Tag, so that the same will be applicable for all, if required it can be specified in each individual HotSpot. The PostBackValue can be set for each HotSpot, that enable to identify the region get triggered, when HotSpotMode is PostBack. the EventArgs gives the PostBackValue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-613051761838099240?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/613051761838099240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=613051761838099240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/613051761838099240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/613051761838099240'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/03/blog-post.html' title='ImageMap Control - ASP.Net 2.0'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-928986011919047361</id><published>2008-03-10T23:52:00.000+05:30</published><updated>2008-03-20T17:29:46.360+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>ForEach File Enumerator</title><content type='html'>It is a Container element in control flow group in the SSIS. The container iterats through the object collection it belongs to. The ForEach File Enumerator iterates all files and directories in a specifies directory. Let us wal through that with an example.&lt;br /&gt;&lt;br /&gt;.Create a new package.&lt;br /&gt;.Drag and Drop the Foreach Loop Container from the Toolbar.&lt;br /&gt;.Right Click, Edit the Container Properties.&lt;br /&gt;.In General tab, set the name of the container&lt;br /&gt;&lt;img src="http://lh5.google.com/asithangae/R9VzoZCekPI/AAAAAAAABP4/vXFj9WYpmK4/s400/Picture1.jpg" style="float:right;"/&gt;&lt;br /&gt;.In Collection Tab, set the Enumerator to Foreach File Enumerator. Set the Folder path to the required path. the Files field can be used to filter the type of files. the file name retrieval format can be set. suppose if the specified contains sub folders and if we want to check  inside  those folders also then check the "Traverse subfolders" Check Box.&lt;br /&gt;.In Variable Mappings tab, Create a new variable, for example "Var" with datatype as string. &lt;br /&gt;&lt;img src="http://lh5.google.com/asithangae/R9VzyZCekQI/AAAAAAAABQA/AD1kPeWp4lk/s288/Picture2.jpg" style="float:right;" /&gt;&lt;br /&gt;also set the index to 0, as the collection manipulates with one object in a loop cycle.&lt;br /&gt;&lt;img src="http://lh6.google.com/asithangae/R9Vz8pCekRI/AAAAAAAABQI/JR7LWw2AYvk/s288/Picture3.jpg" style="float:right;" /&gt;&lt;br /&gt;.The Container is set and ready to use, let us check the container using script task.&lt;br /&gt;.Place a Script Task inside the Foreach Loop Container.&lt;br /&gt;.Right Click, Edit the task.&lt;br /&gt;.Goto to Script tab, and set the ReadOnly Variable Field with the variable used in the Foreach Loop. here set to "Var".&lt;br /&gt;&lt;img src="http://lh6.google.com/asithangae/R9V0FpCekSI/AAAAAAAABQQ/T5yqpqgZycM/s288/Picture4.jpg" style="float:right;" /&gt;&lt;br /&gt;.Click Design Script from the Script tab, a new VS window environment opens with pre set already.&lt;br /&gt;.Type the content, as given below in the existing function&lt;br /&gt; &lt;blockquote&gt;Public Sub Main()&lt;br /&gt;                MsgBox(Dts.Variables("User::Var").Value.ToString())&lt;br /&gt;  Dts.TaskResult = Dts.Results.Success&lt;br /&gt; End Sub&lt;/blockquote&gt; &lt;br /&gt;.Save it, close the environment and click OK in the container Property box.&lt;br /&gt;.The sript task will be evaluvated on every loop cycle. the loop object is passed as a read only parameter for script task. the main functioin in the task displays the value stored in the variable. In this way we can do file or manipulation kind of task through the SSIS. when the package is runed, the files in the specfied folder are displayed as message box to the end user.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-928986011919047361?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/928986011919047361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=928986011919047361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/928986011919047361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/928986011919047361'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/03/foreach-file-enumerator.html' title='ForEach File Enumerator'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-5701411276140341327</id><published>2008-02-24T23:30:00.000+05:30</published><updated>2008-02-24T23:34:26.738+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>SSIS - For Loop Container</title><content type='html'>This works on the tradition counter logic, where it has 3 steps. &lt;br /&gt;1. Intialization, &lt;br /&gt;2. Incrementation, &lt;br /&gt;3. Condition. &lt;br /&gt;Let us see in detail, Stepwise...&lt;br /&gt;. Drag and Drop a For Loop Container from the toolbox to the Control Flow Tab&lt;br /&gt;. Select the Container, add a variable from the Variable box. Variable box can be obtained from the Menu SSIS-&gt;Variables. say variable name is "count" of data type int.&lt;br /&gt;(When we select the container and create a variable the scope of the variable is set only for Container level, means the variable will not be available for other components outside the container.)&lt;br /&gt;. Right Click on the container and select Edit from the Context Menu displayed.&lt;br /&gt;. In the InitExpression, Enter @[User::count]=0. this assigns the value 0 to the user created variable count.&lt;br /&gt;. In the Eval Expression, Enter @[User::Variable] &lt;10. this sets the loop condition.&lt;br /&gt;. In the Assign Expression, Enter @[User::Variable] = @[User::Variable]+1. this increments the value of the variable by 1 for every loop.&lt;br /&gt;. Select Ok and close the Dialog.&lt;br /&gt;. From the tool box, place a script task in the container.&lt;br /&gt;. Right Click the script task and select edit from the context menu.&lt;br /&gt;. Goto script tab in the left panel.&lt;br /&gt;. Click Design Script button located in the right bottom of the dialog. this opens a vb code page with new studio environment with some code writen already.&lt;br /&gt;. Place the code MsgBox("hai"), in the main subroutine, before the assignment of task result.&lt;br /&gt;. save a close the environment.&lt;br /&gt;. Click ok and close the script edit dialog.&lt;br /&gt;. Right Click the container, select execute container from the context menu.&lt;br /&gt;. this runs the For Loop Container, and the tasks inside it. it displays the Hai message box 10 times and stops the execution.&lt;br /&gt;&lt;br /&gt;This example explains the feature of the For Loop Container in a simple, how ever we can use this as per our need in the package.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-5701411276140341327?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/5701411276140341327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=5701411276140341327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5701411276140341327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5701411276140341327'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/02/ssis-for-loop-container.html' title='SSIS - For Loop Container'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-2041349184319111348</id><published>2008-02-24T23:28:00.000+05:30</published><updated>2008-02-24T23:30:04.374+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>SSIS - Expession Builder</title><content type='html'>It is an Editor, which creates expression using the variables and In-Built functions. Normally this editor can be reached for all elements in the package. the button with "..." [3 dots] is clicked to open this editor.&lt;br /&gt;The property of the elements are set directly by assiging values to them, or by setting a expression and the expression is evaluvated in the runtime to set the values.&lt;br /&gt;Almost every control's editor will have a Expressions tab, which can be selected, the tab contains a Field group named Expressions, by selecting the triple dot button again, will opens a Property Expression Editor. this contains two columns. first column contains drop down list, from which a field name can be selected and the second column contains a triple dot button, which actually opens a Expression Builder.&lt;br /&gt;Expression Builder Editor contains 5 blocks.&lt;br /&gt; 1. Variable - list of variables available within the scope is listed.&lt;br /&gt; 2. Built in functions - list of functions are organized in groups and listed.&lt;br /&gt; 3. Description - displays a description of built in function, which is currently selected[Read only]&lt;br /&gt; 4. Expression - variables and functions can be dragged and droped here or expression can be manually keyed in.&lt;br /&gt; 5. Evaluvated Value - the value of the expression will be displayed, when the evaluvate expression is clicked, which throws exception if the expression is not set correctly.&lt;br /&gt;&lt;br /&gt;The Built In Functions block will have type casting symbols and also the supported operators for evaluvating the expression.&lt;br /&gt;once the expression is created succesfully the dialog can be closed, and the expression is assigned to the field. we can assign expressions to any no of fields.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-2041349184319111348?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/2041349184319111348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=2041349184319111348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2041349184319111348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2041349184319111348'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/02/ssis-expession-builder.html' title='SSIS - Expession Builder'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-3165462525699977913</id><published>2008-02-24T23:21:00.001+05:30</published><updated>2008-02-24T23:28:14.169+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>SSIS - Precedence Contraints</title><content type='html'>. It is link created between the Containers, executables, tasks or any control flow elements.&lt;br /&gt;. For example, to view a Precedence Constarint Editor, create two script tasks.&lt;br /&gt;. select a task, it displays a arrows pointing downwards, drag and drop the arrow to the second script task.&lt;br /&gt;. a conector is created in between the tasks. it is called Precedence constaint.&lt;br /&gt;. the default value set to the constraint is success.&lt;br /&gt;. to view the editor, select the connector, right click and select edit from the context menu.&lt;br /&gt;. a dialog box opens with fields, evaluvation operation, constaint and expression.&lt;br /&gt;. the flow can set as per the condition defined here.&lt;br /&gt; . the condition can be set to Constraint, with following values,&lt;br /&gt;  1. Success - allows to flow only if the previous task executed succesfully.&lt;br /&gt;  2. Failure - allows to flow only if the previous task fail to execute.&lt;br /&gt;  3. Completion - allows to flow, without considering the execute status of previous task.&lt;br /&gt; . the condition can be set to Expression. the flow depends on the result of the expression.&lt;br /&gt; . the condition can be set to Constaint or Expression, where both will be defined and flow will be decided by any one.&lt;br /&gt; . the condition can be set to Constraint and Expression, where both will be defined and flow will proceed only if both are passed.&lt;br /&gt;. Multiple Precedence Constraints may contain for a task, in that case the logical Or and And between the Precedence Constraints can also be set using the editor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-3165462525699977913?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/3165462525699977913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=3165462525699977913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3165462525699977913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3165462525699977913'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/02/ssis-precedence-contraints.html' title='SSIS - Precedence Contraints'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-7533911363358126188</id><published>2008-02-24T23:20:00.000+05:30</published><updated>2008-02-24T23:21:51.668+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>SSIS - Control Flow Items</title><content type='html'>Control Flow Items contains Containers and Tasks.&lt;br /&gt;. Containers are Components which  holds the tasks and the task will be executed as per the containers nature.&lt;br /&gt;. Tasks are activity which performs a action. &lt;br /&gt;. SSIS supports various type of tasks related to database, file system, process, web service, FTP, Xml, Sql jobs, message queues.&lt;br /&gt;. Each task can be ordered, or aranged in sequence like one after the other or in parellel using Precedence Constraints.&lt;br /&gt;. Container helps to execute repeative tasks, and also to make a group of task over package.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-7533911363358126188?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/7533911363358126188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=7533911363358126188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7533911363358126188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7533911363358126188'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/02/ssis-control-flow-items.html' title='SSIS - Control Flow Items'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-7921906623443654647</id><published>2008-02-21T12:52:00.000+05:30</published><updated>2008-02-21T12:55:09.656+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Debug'/><category scheme='http://www.blogger.com/atom/ns#' term='Learn'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><title type='text'>Debug Visual C++ ActiveX DLL [Web component]</title><content type='html'>The ActiveX dll can be debugged using test container. It is a in-built tool with VC++, Visual Studio IDE. we can set the debug environment in order to use this. In the project properties, go to Debug section, then select the "command" property and set the value as test container from the drop down list. so, when the application is build and run, Test Container application is invoked and we can add the dll component from a avalable list of components. once selected and added in the container, the GUI part is it  will be like a box, but the methods can be invoked and tested for functionality.&lt;br /&gt;This is one way for testing using Test Container tool.&lt;br /&gt;If the component is web based, then In project properties-&gt;Debug Section set the value to Internet Explorer for "command" property. once it is set and run, the build will be made and the Internet explorer will be opened with blank url. enter the url of the page where ActiveX component is used. this will opens the component in debug Mode. Before starting this, let us see the environment. the ActiveX component wil be installed for the first time in client system, or else when the page is opened the object will be downloaded and installed in the location as mentioned by the devoloper. once it is installed, it will used for succesive calls of the same page, untill client uninstalls the control. Before stating the debug process, the newly build dll and the corresponding pdb file has to be placed in the location where the application installed the component while it is rendered. Now the enviro is set and redy to work, Run the project, it opens the url. place the debug point wherever needed, enter the required page url in th eopened browser and it stops when the debug point reaches.&lt;br /&gt;1. Set the Project property for Debug section-&gt;Command to Iexplore.exe&lt;br /&gt;2. Build the component.&lt;br /&gt;3. After successful build copy the dll and correspoding pdb file in the Component installed location.&lt;br /&gt;4. Place the debug points as required.&lt;br /&gt;5. Run the application, it stops at the Break point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-7921906623443654647?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/7921906623443654647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=7921906623443654647' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7921906623443654647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7921906623443654647'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/02/debug-visual-c-activex-dll-web.html' title='Debug Visual C++ ActiveX DLL [Web component]'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-4864386770673985545</id><published>2008-02-18T12:59:00.000+05:30</published><updated>2008-02-18T13:01:07.951+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>Access Clibboard using Javascript</title><content type='html'>In Internet Explorer we can access clipboard programatically, the same is not possible in Firefox browser. the security permission are more in firefox, so it will not allow a programatical access to the clipboard. but we can copy and paste contents in the form.&lt;br /&gt;if we use code to do the pasting of data from external contents, we can get data using this way.&lt;br /&gt;&lt;blockquote&gt;window.clipboardData.getData("Text")&lt;/blockquote&gt;&lt;br /&gt;By doing this way, we lose the format of the content we copied, to avoid this we have another way to do the same.&lt;br /&gt;&lt;blockquote&gt;var range = document.selection.createRange();&lt;br /&gt;range.execCommand("paste");&lt;/blockquote&gt;&lt;br /&gt;if we write code for paste this way, the format of the content we copied will be preserved while pasting. it also accepts the table format data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-4864386770673985545?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/4864386770673985545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=4864386770673985545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/4864386770673985545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/4864386770673985545'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/02/access-clibboard-using-javascript.html' title='Access Clibboard using Javascript'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-4961114584978978724</id><published>2008-02-14T12:42:00.000+05:30</published><updated>2008-02-14T12:44:10.818+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>What is SSIS package?</title><content type='html'>1. SSIS package is a collection of connections, control flow elements, data flow elements, event handlers and variables.&lt;br /&gt;2. SSIS package can be built using Visual Studio 2005 by design mode by dragging and droping controls or programatically by adding the referece of SSIS components.&lt;br /&gt;3. SSIS package can be stored in File System, SQL Server, SSIS package store.&lt;br /&gt;4. Package is a unit of work that is retrived, executed and saved, either manually or on scheduled intervals of time or on specific day and time.&lt;br /&gt;5. It is vast and lots of features involved, reliable and configurable.&lt;br /&gt;6. Other major objects used with package to support on runtime are configuration, Logging and Event Handlers.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Event Handlers :&lt;/strong&gt; It is an work flow that runs in response to the events raised in package, task or container.&lt;br /&gt;&lt;strong&gt;Configuration :&lt;/strong&gt; It is a set of property values used by the package, it enables the package to be customized.&lt;br /&gt;&lt;strong&gt;Logging :&lt;/strong&gt; It is a collection if information about the package, that is collected when it runs.&lt;br /&gt;&lt;strong&gt;Variables :&lt;/strong&gt; Supports system variables &amp; user defined variables. it can be used in expression, script and configuration. each variable have scope depends its creation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-4961114584978978724?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/4961114584978978724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=4961114584978978724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/4961114584978978724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/4961114584978978724'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2008/02/what-is-ssis-package.html' title='What is SSIS package?'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6115942881604236567</id><published>2007-11-14T17:09:00.000+05:30</published><updated>2007-11-14T17:14:57.132+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Learn'/><title type='text'>Readonly Vs Constant Variables in .Net</title><content type='html'>&lt;p&gt;&lt;span style="font-family:verdana;"&gt;ReadOnly variable can be declared without assigning a value to it.&lt;br /&gt;Constant variable can only be declared with assigning a value to it.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;ReadOnly variable can be assigned in constructor or in object intialization.&lt;br /&gt;Constant are same, cannot be modified anytime.&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6115942881604236567?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6115942881604236567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6115942881604236567' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6115942881604236567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6115942881604236567'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/11/readonly-vs-constant-variables-in-net.html' title='Readonly Vs Constant Variables in .Net'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-2522105631246538520</id><published>2007-11-06T17:29:00.000+05:30</published><updated>2007-11-06T17:41:26.966+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='HttpHandlers'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>js File Compressor for ASP.Net applications</title><content type='html'>&lt;span style="font-family:Courier New;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;Create a WebSite, or Add a reference of the dll to the WebSite.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;In Web.Config file a new httpHandler in HttpHandlers Section.&lt;/span&gt;&lt;/p&gt;&lt;code&gt;&lt;span style="font-family:courier new;"&gt;&lt;blockquote&gt;&lt;code&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;add path="*.js"&lt;br /&gt;type="ClassLibrary1.Handler, ClassLibrary1, Version=1.0.0.0, Culture=neutral"&lt;br /&gt;validate="false" verb="*"&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/code&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;That's all, rest of the work will be done by our Handler.&lt;br /&gt;Let us see how it works,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;Basically the HttpHandlers are used to handle the request of the WebApplication.&lt;br /&gt;This Handler is to handle the javascript file. it removes the white spaces, new line characters, inline comments and multiline comments. the Handlers class is inherited from the IHttpHandler Interface, it implements ProcessRequest method.&lt;/span&gt;&lt;add path="*.js" type="ClassLibrary1.Handler, ClassLibrary1, Version=1.0.0.0, Culture=neutral" validate="false" verb="*"&gt;&lt;/add&gt;&lt;/p&gt;&lt;span style="font-family:courier new;"&gt;//Getting the script file name from request&lt;br /&gt;Uri url = context.Request.Url;&lt;br /&gt;string filename = url.Segments[url.Segments.Length-1];&lt;br /&gt;&lt;br /&gt;//Creating a file stream to read the script file.&lt;br /&gt;FileStream fs = new FileStream(context.Server.MapPath(filename), FileMode.Open);&lt;br /&gt;StreamReader sr = new StreamReader(fs);&lt;br /&gt;string js = sr.ReadToEnd();&lt;br /&gt;string a = string.Empty , b = string.Empty;&lt;br /&gt;//Removing the single line comments&lt;br /&gt;while (js.IndexOf("//")!=-1)&lt;br /&gt;{&lt;br /&gt;a = js.Substring(0, js.IndexOf("//"));&lt;br /&gt;b = js.Substring(js.IndexOf("\r\n", js.IndexOf("//")));&lt;br /&gt;js = a+b;&lt;br /&gt;}&lt;br /&gt;//Removing multiline comments&lt;br /&gt;while (js.IndexOf("/*") != -1)&lt;br /&gt;{&lt;br /&gt;a = js.Substring(0, js.IndexOf("/*"));&lt;br /&gt;b = js.Substring(js.IndexOf("*/", js.IndexOf("/*"))+2);&lt;br /&gt;js = a + b;&lt;br /&gt;}&lt;br /&gt;//To Remove Blank spaces&lt;br /&gt;js = js.Replace(" ", string.Empty);&lt;br /&gt;//To remove Carrige retun and new line character&lt;br /&gt;js = js.Replace("\r", string.Empty);&lt;br /&gt;js = js.Replace("\n", string.Empty);&lt;br /&gt;//Flushing it in response&lt;br /&gt;context.Response.Write(js);&lt;br /&gt;//Closing the resourses used&lt;br /&gt;sr.Close();&lt;br /&gt;fs.Close();&lt;br /&gt;sr.Dispose();&lt;br /&gt;fs.Dispose();&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/useritems/js_File_Handler.asp"&gt;&lt;span style="font-family:verdana;"&gt;You can get the same from my article in CodeProject&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-2522105631246538520?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/2522105631246538520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=2522105631246538520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2522105631246538520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2522105631246538520'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/11/js-file-compressor-for-aspnet.html' title='js File Compressor for ASP.Net applications'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-4782946410989235560</id><published>2007-10-26T16:30:00.000+05:30</published><updated>2007-10-26T16:42:46.934+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><title type='text'>Ajax Shortcuts for Element Positioning</title><content type='html'>&lt;span style="font-family:verdana;"&gt;&lt;em&gt;getBounds Method&lt;/em&gt;&lt;br /&gt;Gets the x and y coordinates, width and height of a element.&lt;br /&gt;getBounds Method is in Sys.UI.DomElement namespace.&lt;br /&gt;Returns a json formatted object with x,y,width,height as its members.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// Example&lt;br /&gt;// Get the bounds of the element&lt;br /&gt;var elementRef = $get("elementID");&lt;br /&gt;var elementBounds = Sys.UI.DomElement.getBounds(elementRef);&lt;br /&gt;var xPosition = elementBounds.x;&lt;br /&gt;var yPosition = elementBounds.y;&lt;br /&gt;var width = elementBounds.width;&lt;br /&gt;var height = elementBounds.height;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;em&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;em&gt;getLocation Method&lt;/em&gt;&lt;br /&gt;Gets the x and y coordinates.&lt;br /&gt;getLocation Method is in Sys.UI.DomElement namespace.&lt;br /&gt;Returns a json formatted object with x,y,width,height as its members.&lt;br /&gt;getLocation may fail to return a correct value if the positing is fixed mode.(style="position:fixed"). &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// Example&lt;br /&gt;// Get the bounds of the element&lt;br /&gt;var elementRef = $get("elementID");&lt;br /&gt;var elementBounds = Sys.UI.DomElement.getLocation(elementRef);&lt;br /&gt;var xPosition = elementBounds.x;&lt;br /&gt;var yPosition = elementBounds.y;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;em&gt;setLocation Method&lt;/em&gt;&lt;br /&gt;Sets the x and y coordinates.&lt;br /&gt;setLocation Method is in Sys.UI.DomElement namespace.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;//Example&lt;br /&gt;// Get the location of the element&lt;br /&gt;var elementRef = $get("elementID");&lt;br /&gt;var elementLoc = Sys.UI.DomElement.getLocation(elementRef);&lt;br /&gt;// Move the element's x position&lt;br /&gt;Sys.UI.DomElement.setLocation(elementRef, 100, elementLoc.y);&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-4782946410989235560?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/4782946410989235560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=4782946410989235560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/4782946410989235560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/4782946410989235560'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/10/ajax-shortcuts-for-element-positioning.html' title='Ajax Shortcuts for Element Positioning'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-8333413770396625701</id><published>2007-10-26T12:36:00.000+05:30</published><updated>2007-10-26T13:26:56.028+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><title type='text'>Ajax StringBuilder for Javascript</title><content type='html'>&lt;span style="font-family:verdana;"&gt;String builder is used to concatenate string. the mechanism is created in such a way that the memory is not wasted for concatenating a sequence of strings. adding a string using the '+' operator creates a new instance of the string variable each time we add. String builder does the same job with a single instance. this reduces the memory and increses performance.&lt;br /&gt;&lt;br /&gt;StringBuilder belongs to namespace Sys.&lt;br /&gt;it can be instantiated like this &lt;/span&gt;&lt;pre&gt;var sb = new Sys.StringBuilder(string);&lt;/pre&gt;&lt;span style="font-family:verdana;"&gt;&lt;strong&gt;Methods of StringBuilder Class&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;em&gt;append Method&lt;/em&gt;&lt;br /&gt;Appends a string to the end of the StringBuilder instance.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;appendLine Method&lt;/em&gt;&lt;br /&gt;Appends a new string with a line terminator to the end of the StringBuilder instance.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;clear Method&lt;/em&gt;&lt;br /&gt;Clears the contents of the StringBuilder instance.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;isEmpty Method&lt;/em&gt;&lt;br /&gt;Determines whether the StringBuilder instance has any content.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;toString Method&lt;/em&gt;&lt;br /&gt;Creates a string from the contents of a StringBuilder instance.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;pre&gt;var sb = new Sys.StringBuilder("this");&lt;br /&gt;sb.append("string ");&lt;br /&gt;sb.append("is ");&lt;br /&gt;sb.append("build by ");&lt;br /&gt;sb.append("String Builder class");&lt;br /&gt;// Displays: "The result string : this string is build by String BUilder class"&lt;br /&gt;alert("The result" + sb.toString());&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-8333413770396625701?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/8333413770396625701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=8333413770396625701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/8333413770396625701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/8333413770396625701'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/10/ajax-stringbuilder-for-javascript.html' title='Ajax StringBuilder for Javascript'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6175048551016270472</id><published>2007-10-25T16:59:00.000+05:30</published><updated>2007-10-25T17:49:12.739+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><title type='text'>Ajax Shortcuts</title><content type='html'>&lt;span style="font-family:verdana;"&gt;The Ajax &lt;strong&gt;&lt;em&gt;ScriptManager&lt;/em&gt;&lt;/strong&gt; has a set of client side reference function, which can be used with javascript.&lt;br /&gt;&lt;br /&gt;1. $get("elementID")&lt;br /&gt;&lt;br /&gt;Method that gets the reference to the specified Control id.This is equivalent to the method document.getElementById("elementId"), it returns the control object.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$get("elementid").value = someValue;&lt;br /&gt;alert($get("elementid").value);&lt;br /&gt;var someVariable = $get("elementid").value;&lt;br /&gt;//Direct Method&lt;br /&gt;Sys.UI.DomEvent.get("elementid").value = someValue;&lt;br /&gt;alert(Sys.UI.DomEvent.get("elementid").value);&lt;br /&gt;var someVariable = Sys.UI.DomEvent.get("elementid").value;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;2. $find("elementID",parent)&lt;br /&gt;&lt;br /&gt;Finds the control within the page or within the specified parent. This is more similar to server side Find Control method, the parent parameter is optional, if provided, the search is specified to that parent control only. it returns control object if found else returns null.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var o = $find("elementID", mydiv);&lt;br /&gt;//Direct Method&lt;br /&gt;var obj = Sys.UI.DomEvent.find("elementID", mydiv);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;3. $addHandler(element, eventName, handler);&lt;br /&gt;&lt;br /&gt;Method to assign a handler function to event of a specified control. The eventName parameter should not include the "on" prefix. For example, specify "click" instead of "onclick".&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$addHandler($get("elementID"),"click",myHandlerFunction);&lt;br /&gt;//Direct Method&lt;br /&gt;Sys.UI.DomEvent.addHandler($get("elementID"),"click",myHandlerFunction);&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;4. $removeHandler(element, eventName, handler);&lt;br /&gt;Method to remove a existing handler function to event of a specified control.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$removeHandler($get("elementID"),"click",myHandlerFunction);&lt;br /&gt;//Direct Method&lt;br /&gt;Sys.UI.DomEvent.removeHandler($get("elementID"),"click",myHandlerFunction);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:0;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6175048551016270472?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6175048551016270472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6175048551016270472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6175048551016270472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6175048551016270472'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/10/ajax-shortcuts.html' title='Ajax Shortcuts'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-2020859477190613327</id><published>2007-10-25T16:10:00.000+05:30</published><updated>2007-10-25T16:22:25.734+05:30</updated><title type='text'>Row_Number() in SQL Server</title><content type='html'>&lt;span style="font-family:verdana;"&gt;The row number function returns the sequitial number of the row within the partition of the result set. this is one of the Ranking function in SQL Server.&lt;br /&gt;&lt;/span&gt;&lt;pre&gt;ROW_NUMBER() OVER ( [PARTITION BY &lt;column&gt;{,}] ORDER BY &lt;column&gt;)&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The Row_Number() function sorts the result set as per the column specified in the &lt;em&gt;ORDER BY&lt;/em&gt; clause and starts numbering the row with a intial value of 1. The &lt;em&gt;PARTITION BY &lt;/em&gt;is a optional parameter. if it is used the result is partioned as per the column or expression specified and starts numbering the row with intial value of 1 for each partition. partioning is similar to group functionality. it groups the result set and arranges in order and serialize the row numbers.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;PRE&gt;&lt;br /&gt;--EXAMPLE WITHOUT PARTITION&lt;br /&gt;SELECT orderid, customerid, &lt;br /&gt;  ROW_NUMBER() OVER(ORDER BY orderid) AS num &lt;br /&gt;FROM orders&lt;br /&gt;WHERE orderid &lt; 10400&lt;br /&gt;AND   customerid &lt;= 'BN'&lt;br /&gt;&lt;br /&gt;--EXAMPLE WITH SINGLE PARTITION&lt;br /&gt;WITH OrderedOrders AS&lt;br /&gt;(SELECT SalesOrderID, OrderDate,&lt;br /&gt;ROW_NUMBER() OVER (partition by OrderDate order by OrderDate)as RowNumber&lt;br /&gt;FROM Sales.SalesOrderHeader ) &lt;br /&gt;SELECT * &lt;br /&gt;FROM OrderedOrders &lt;br /&gt;&lt;br /&gt;--EXAMPLE WITH MULTIPLE PARTITION&lt;br /&gt;WITH OrderedOrders AS&lt;br /&gt;(SELECT SalesOrderID, OrderDate,&lt;br /&gt;ROW_NUMBER() OVER (partition by Datepart(yy,OrderDate), Datepart(mm,OrderDate), Datepart(dd,OrderDate) order by OrderDate)as RowNumber&lt;br /&gt;FROM Sales.SalesOrderHeader ) &lt;br /&gt;SELECT * &lt;br /&gt;FROM OrderedOrders &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-2020859477190613327?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/2020859477190613327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=2020859477190613327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2020859477190613327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2020859477190613327'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/10/rownumber-in-sql-server.html' title='Row_Number() in SQL Server'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-1801970516433958342</id><published>2007-10-25T13:03:00.000+05:30</published><updated>2007-10-25T13:20:48.498+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Error Handling in SQL Server 2005</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Error handling in previous versions of SQL Server are Tedious. we find the error occured by frequently checking the @@ERROR Variable after each statement and raise the error accordingly.&lt;br /&gt;In SQL Server 2005, Try Catch Block was added to extend error handling.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre&gt;-- Sample code to Try Catch&lt;br /&gt;CREATE PROCEDURE someproc&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;    BEGIN TRY&lt;br /&gt;        SELECT * FROM authors&lt;br /&gt;    END TRY&lt;br /&gt;    BEGIN CATCH&lt;br /&gt;       SELECT ERROR_NUMBER()&lt;br /&gt;    END CATCH&lt;br /&gt;END&lt;br /&gt;GO&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;b&gt;Things to be remembered while using Try Catch&lt;/b&gt;&lt;br /&gt;1. Try Block should be follwed by a Catch Block&lt;br /&gt;2. Try and Catch should be assoiciated to single batch only&lt;br /&gt;3. Try and Catch Block can be nested.&lt;br /&gt;4. Muliple Catch Block should not be used for a single Try Block&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;b&gt;TRY…CATCH uses error functions to capture error information.&lt;/b&gt;&lt;br /&gt;1. ERROR_NUMBER() returns the error number.&lt;br /&gt;2. ERROR_MESSAGE() returns the complete text of the error message. The text includes the values supplied for any substitutable parameters such as lengths, object names, or times.&lt;br /&gt;3. ERROR_SEVERITY() returns the error severity.&lt;br /&gt;4. ERROR_STATE() returns the error state number.&lt;br /&gt;5. ERROR_LINE() returns the line number inside the routine that caused the error.&lt;br /&gt;6. ERROR_PROCEDURE() returns the name of the stored procedure or trigger where the error occurred.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;b&gt;Try Catch in Trasactions&lt;/b&gt;&lt;br /&gt;The function XACT_STATE() return the state of transaction.&lt;br /&gt;-1 - failed transaction&lt;br /&gt;1 - success transaction&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;-- catch errors in a transaction&lt;br /&gt; BEGIN TRY&lt;br /&gt;   SELECT * FROM authors&lt;br /&gt; END TRY&lt;br /&gt; BEGIN CATCH&lt;br /&gt;   -- Test tx state&lt;br /&gt;   IF (XACT_STATE()) = -1&lt;br /&gt;     ROLLBACK TRANSACTION&lt;br /&gt;   IF (XACT_STATE()) = 1&lt;br /&gt;     COMMIT TRANSACTION&lt;br /&gt;END CATCH&lt;br /&gt;GO&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-1801970516433958342?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/1801970516433958342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=1801970516433958342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/1801970516433958342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/1801970516433958342'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/10/error-handling-in-sql-server-2005.html' title='Error Handling in SQL Server 2005'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6649101125183522483</id><published>2007-10-17T16:23:00.000+05:30</published><updated>2007-10-17T16:30:18.559+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='ADO.Net 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Building Hierarchical Xml Data using DataSet</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Building a xml string in Hierarchical manner using the sql query. The BuildMap method of SiteMapBuilder class accepts dataset, identity column and refering colum and key value as a parameters and retuns the xml. the dataset contains the datatable will two columns, with one column refering the another column. no relation should be created explicitly. the data in the table should have a relation.&lt;br /&gt;&lt;br /&gt;the class is listed below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Imports Microsoft.VisualBasic&lt;br /&gt;Imports System.Xml&lt;br /&gt;Imports System.Data&lt;br /&gt;&lt;br /&gt;Public Class HierarchicalXMLDataBuilder&lt;br /&gt;&lt;br /&gt;    Private ParentColumn As String&lt;br /&gt;    Private ChildColumn As String&lt;br /&gt;    Private NoOfColumns As Integer&lt;br /&gt;    Private Data As DataSet&lt;br /&gt;    Private vuData As DataView&lt;br /&gt;&lt;br /&gt;    Public Function BuildMap(ByVal data As DataSet, ByVal IdentityColumn As String, ByVal ReferenceColumn As String, ByVal KeyValue As String) As String&lt;br /&gt;        Me.ParentColumn = IdentityColumn&lt;br /&gt;        Me.ChildColumn = ReferenceColumn&lt;br /&gt;        Me.Data = data&lt;br /&gt;        vuData = New DataView(data.Tables(0))&lt;br /&gt;        NoOfColumns = data.Tables(0).Columns.Count&lt;br /&gt;        Dim xml As String&lt;br /&gt;        xml = BuildChildNodes(vuData, ParentColumn &amp; " = " &amp; KeyValue)&lt;br /&gt;        Return xml&lt;br /&gt;    End Function&lt;br /&gt;&lt;br /&gt;    Private Function BuildChildNodes(ByVal vu As DataView, ByVal filter As String) As String&lt;br /&gt;        Dim nodeBuilder As New StringBuilder(String.Empty)&lt;br /&gt;        vu.RowFilter = filter&lt;br /&gt;        Dim RowCounter As Integer = 0&lt;br /&gt;        For RowCounter = 0 To vu.Count - 1&lt;br /&gt;            nodeBuilder.Append("&amp;lt;Node")&lt;br /&gt;            Dim ColCounter As Integer = 0&lt;br /&gt;            For ColCounter = 0 To NoOfColumns - 1&lt;br /&gt;                nodeBuilder.Append(" ")&lt;br /&gt;                nodeBuilder.Append(Data.Tables(0).Columns(ColCounter).ColumnName)&lt;br /&gt;                nodeBuilder.Append(" = """)&lt;br /&gt;                nodeBuilder.Append(vu.Item(RowCounter)(ColCounter).ToString())&lt;br /&gt;                nodeBuilder.Append(""" ")&lt;br /&gt;            Next&lt;br /&gt;            nodeBuilder.Append(" &gt;")&lt;br /&gt;            Dim vuData2 As New DataView(data.Tables(0))&lt;br /&gt;            If vu.Count &gt; RowCounter Then&lt;br /&gt;                nodeBuilder.Append(BuildChildNodes(vuData2, ChildColumn &amp; " = " &amp; vu.Item(RowCounter)(ParentColumn)))&lt;br /&gt;            End If&lt;br /&gt;            nodeBuilder.Append("&amp;lt;/Node&amp;gt;")&lt;br /&gt;        Next&lt;br /&gt;        Return nodeBuilder.ToString()&lt;br /&gt;    End Function&lt;br /&gt;End Class&lt;/span&gt;&lt;br /&gt;the BUilder class can be used this way, and can be binded with treeview or to a menu control.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Dim XmlData As New SiteMapBuilder&lt;br /&gt;Dim XmlString As String = XmlData.BuildMap(ds, "RowId", "ParentID", 1)&lt;br /&gt;Dim doc As New System.Xml.XmlDocument()&lt;br /&gt;doc.LoadXml(XmlString)&lt;br /&gt;doc.Save(Server.MapPath("xmlfile.xml"))&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6649101125183522483?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6649101125183522483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6649101125183522483' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6649101125183522483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6649101125183522483'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/10/building-hierarchical-xml-data-from-sql.html' title='Building Hierarchical Xml Data using DataSet'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-7652154033513614813</id><published>2007-10-01T12:46:00.000+05:30</published><updated>2007-10-01T13:12:11.248+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Review'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Dispose Vs Finalizer</title><content type='html'>&lt;span style="font-family:verdana;"&gt;The Dispose and Finalizer are methods used to clear the resources used for the object.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The Dispose is a method of IDisposable interface. we have to inherit this interface for our object and implement the method Dispose, to clear our objects used in our application. suppose if we use collection and dictionary or any other huge resource for a specific object, we have to clear all the memory used by the object when it is destroyed. to make this happen internallly for every object we have to implement Dispose method and it takes care of the clearing the memory.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The Finalizer method is also similar type but this will be called when GC gets invoked. this GC.Collect call will invoke Finalizer method for each and every object. this will do a emergency clean, it may lead to data loss some times.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;we can also implement finalizer method as a special case. the call of finalizer method after a dipose is a waste of process time, we can bypass this action by setting the property SupressFinalizer to true. this will help to avoid calling the finalizer method when GC gets activated.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-7652154033513614813?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/7652154033513614813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=7652154033513614813' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7652154033513614813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7652154033513614813'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/10/dispose-vs-finalizer.html' title='Dispose Vs Finalizer'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-747723314911138234</id><published>2007-10-01T12:30:00.000+05:30</published><updated>2007-10-01T12:37:03.379+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><title type='text'>New operator ?? in c#</title><content type='html'>&lt;span style="font-family:verdana;"&gt;The operator '??' is in c#, which is used check the value is null.&lt;br /&gt;Previously, we used to check the null value by the following methods..&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;if (a!=null) { c=a; } &lt;/span&gt;or &lt;br /&gt;&lt;span style="font-family:courier new;"&gt;c = ((a!=null)?a:0);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;we can do the same checking with the new operator ?? like this..&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;c = a??0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;By this statement the value a will be assigned to c if it is not null else the zero will be assigned.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-747723314911138234?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/747723314911138234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=747723314911138234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/747723314911138234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/747723314911138234'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/10/new-operator-in-c.html' title='New operator ?? in c#'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-5073241434634752517</id><published>2007-08-01T17:35:00.000+05:30</published><updated>2007-08-01T17:51:24.177+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='ADO.Net 2.0'/><title type='text'>More on DataTable in ADO.Net 2.0</title><content type='html'>&lt;span style="font-family:verdana;"&gt;The DataTable's CreateDataReader method creates an instance of DataTable Reader. When a DataTableReader is created from a DataSet or a DataTable's CreateDataReader method, the DataTableReader will contain all of the rows from the container object, with the exception of deleted rows. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The DataTableReader is a lighter weight object than the DataTable and, unlike the DataReader (SqlDataReader), the DataTableReader is disconnected. This is a great feature because you get the lightweight object that you can iterate through quickly (like the DataReader) and it is disconnected from any data source (unlike the DataReader). A DataTableReader can be thought of as an iterator over the underlying table's rows, similar to a foreach enumeration of the contents of the table.Keep in mind that the DataTableReader only moves forward.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The following example shows how you can create a DataTableReader.&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:courier new;"&gt;using (SqlConnection cn = new SqlConnection(cnStr))&lt;br /&gt;{&lt;br /&gt;SqlCommand cmd = new SqlCommand(sqlAllCustomers, cn);&lt;br /&gt;SqlDataAdapter adpt = new SqlDataAdapter(cmd);&lt;br /&gt;DataTable dtCustomers = new DataTable("Customers");&lt;br /&gt;adpt.Fill(dtCustomers);&lt;br /&gt;DataTableReader dtRdr = ds.CreateDataReader();&lt;br /&gt;dgvCustomers.DataSource = dtRdr;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Loading multiple Table's in DataTableReader is similar to the retriving multiple resultset. the method NextResult can be used to move to other table's records.&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:courier new;"&gt;DataTableReader dtRdr = dt1.CreateDataReader();&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:courier new;"&gt;DataTable dt2 = new DataTable();&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:courier new;"&gt;dt2.Load(dtRdr);&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Like Dataset Merge, Two Tables can be merged together by the method Merge of DataTable.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;dtTableOne.Merge(dtTableTwo);&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Similar to DataSet, DataTable can be written as XML by the WriteXml method. the DataTable in ADO.NET 2.0 also exposes the ReadXml, ReadXmlSchema, and WriteXmlSchema methods.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The DataSet also has some new methods and properties. In fact, both the DataSet and the DataTable now expose the RemotingFormat property as well as the Load and CreateDataReader methods. The RemotingFormat property is used to indicate whether to serialize the DataTable or DataSet in binary or XML format.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-5073241434634752517?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/5073241434634752517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=5073241434634752517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5073241434634752517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5073241434634752517'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/08/more-on-datatable-in-adonet-20.html' title='More on DataTable in ADO.Net 2.0'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-9114451859192693159</id><published>2007-08-01T16:08:00.000+05:30</published><updated>2007-08-01T16:13:44.837+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Ajax Scipt Method returns XML Formatted result.</title><content type='html'>&lt;span style="font-family:verdana;"&gt;The ResponseFormat attribute of script method in ASP.NET AJAX’s ScriptMethod is used to return result in XML Format.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;[ScriptMethod (ResponseFormat=ResponseFormat.Xml)]&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;public XmlDocument GetData()&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;  ...&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-9114451859192693159?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/9114451859192693159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=9114451859192693159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/9114451859192693159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/9114451859192693159'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/08/ajax-scipt-method-returns-xml-formatted.html' title='Ajax Scipt Method returns XML Formatted result.'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-8939995584722994053</id><published>2007-08-01T15:29:00.000+05:30</published><updated>2007-08-01T15:41:51.225+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>GridView Control No Data Message</title><content type='html'>&lt;span style="font-family:verdana;"&gt;The GridView control supports the EmptyDataTemplate property for you to specify the markup that should be used when the control is bound to an empty data source. Don't forget to write the Databind code in the code behind page. if the binded object [DataSet or DataTable or ICollection] is empty, then this empty template will be displayed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;?xml:namespace prefix = asp /&gt;&lt;asp:gridview&gt;&lt;/emptydatatemplate&gt;&amp;lt;asp:GridView ...&amp;gt;&lt;/asp:gridview&gt;&lt;br /&gt;&lt;asp:gridview&gt;  ...&lt;/asp:gridview&gt;&lt;br /&gt;&lt;asp:gridview&gt;  &amp;lt;EmptyDataTemplate&amp;gt;&lt;/asp:gridview&gt;&lt;br /&gt;&lt;asp:gridview&gt;     &amp;lt;table style="border:solid 1px black"&amp;gt;&lt;/asp:gridview&gt;&lt;asp:gridview&gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;/asp:gridview&gt;&lt;br /&gt;&lt;asp:gridview&gt;       &amp;lt;b&amp;gt;&lt;/asp:gridview&gt;&lt;asp:gridview&gt;GridView Control No Data Message&amp;lt;/b&amp;gt;&lt;/asp:gridview&gt;&lt;br /&gt;&lt;asp:gridview&gt;        No data to display.     &amp;lt;/td&amp;gt;&lt;/asp:gridview&gt;&lt;br /&gt;&lt;asp:gridview&gt;       &amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;/asp:gridview&gt;&lt;br /&gt;&lt;asp:gridview&gt;  &amp;lt;/EmptyDataTemplate&amp;gt;&lt;/asp:gridview&gt;&lt;br /&gt;&lt;asp:gridview&gt;&amp;lt;/asp:GridView&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/asp:gridview&gt;&lt;asp:gridview&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&lt;/asp:gridview&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-8939995584722994053?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/8939995584722994053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=8939995584722994053' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/8939995584722994053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/8939995584722994053'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/08/gridview-control-no-data-message.html' title='GridView Control No Data Message'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6981831922496464989</id><published>2007-08-01T15:20:00.000+05:30</published><updated>2007-08-01T15:28:56.667+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>T-SQL Statement SET NOCOUNT ON</title><content type='html'>&lt;span style="font-family:verdana;"&gt;This one line of code, put at the top of a stored procedure turns off the messages that SQL Server sends back to the client after each T-SQL statement is executed.  This is performed for all SELECT, INSERT, UPDATE, and DELETE statements. Having this information is handy when you run a T-SQL statement in a query window, but when stored procedures are run there is no need for this information to be passed back to the client.&lt;br /&gt;By removing this extra overhead from the network it can greatly improve overall performance for your database and application.&lt;br /&gt;If you still need to get the number of rows affected by the T-SQL statement that is executing you can still use the @@ROWCOUNT option.  By issuing a SET NOCOUNT ON this function (@@ROWCOUNT) still works and can still be used in your stored procedures to identify how many rows were affected by the statement.&lt;br /&gt;Microsoft even realized the issue that this creates and has changed the stored procedure templates from SQL Server 2000 to SQL Server 2005. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:78%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:78%;"&gt;courtesy : - MSSQLTips.com &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6981831922496464989?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6981831922496464989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6981831922496464989' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6981831922496464989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6981831922496464989'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/08/t-sql-statement-set-nocount-on.html' title='T-SQL Statement SET NOCOUNT ON'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-2004529466578683854</id><published>2007-07-20T17:19:00.000+05:30</published><updated>2007-07-20T17:41:50.598+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>Debug Javascript in a funny way</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Debugging the javascript code is possible, we don't require any special IDE for debugging, Visual Studio is quiet suffcient. &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;There are two methods to achieve it.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Before starting the debugging process, enable debugging in Internet explorer. we can do that from Internet options.&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;Open Internet option dialog box.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;Select Advanced tab. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;In Browsing group, uncheck the Disable script Debugging (Internet Explorer) check box &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;Also the uncheck the Check box next to that for other browsers.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:verdana;"&gt;Method One : Write the javascript part in a separate js file, and use the Braek point. so when you run the application, the debugger will prompt near the Break point.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Method Two : Write a line of junk code before one line of your required Break point, when you run the code, it prompts for the error and confirms with you for debugging, click yes and it point to the junk line of code, move the cursor to the next line and use the VS IDE in Break mode as usual. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;In VS Debug Mode, we can use the immediate widow and visualize values for varables. But the watch functionalies will not work, but still the intellisence browser will work in VS2005, so that we can explore the objects and their members easily.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;To avoid this ODD way, we  have wait for the VS 2008 release. The New Javascript Debugging and also our favorite Intellisence is added for javascript also in that edition.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-2004529466578683854?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/2004529466578683854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=2004529466578683854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2004529466578683854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/2004529466578683854'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/07/debug-javascript-in-funny-way.html' title='Debug Javascript in a funny way'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-1192500594230803353</id><published>2007-07-20T16:38:00.000+05:30</published><updated>2007-07-20T16:49:33.698+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Substitute Update Control with User Control Template</title><content type='html'>&lt;span style="font-family:verdana;"&gt;The update control of Ajax is known to everybody, this is dependent of Built-In server controls, so it increases the view state and overload the server.&lt;br /&gt;Let us use the JavaScript to substitute the same scenario without using the server controls.&lt;br /&gt;To create a example, we need to create webpage, web service, and user control with a small class for template purpose.&lt;br /&gt;The user control code looks like this&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&amp;lt;%@ Control Language="C#" AutoEventWireup="true"&lt;br /&gt;Codebehind="patient.ascx.cs" Inherits="AJAXEnabledWebApplication.patient"%&amp;gt;&lt;br /&gt;&amp;lt;asp:Repeater runat="server" ID="sample"&amp;gt;&lt;br /&gt;&amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;table width="100%"&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td width="60%"&amp;gt;&amp;lt;%# Eval("PatientName") %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td width="20%"&amp;gt;&amp;lt;%# Eval("sex") %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td width="20%"&amp;gt;&amp;lt;%# Eval("DOB") %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;/asp:Repeater&amp;gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Here we are using the repeater control for binding the dataset values. The column names are used in the td for data binding.&lt;br /&gt;The code behind part of user control&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;public partial class patient : System.Web.UI.UserControl&lt;br /&gt;{&lt;br /&gt;public object data;&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;sample.DataSource = (DataSet)data;&lt;br /&gt;sample.DataBind();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The public member data used here to bind the grid. This is written in generic way to bind any sort of data. The data will be assigned value later when we load the control in the page.&lt;br /&gt;Let us see what is written in template.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;using System;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Reflection;&lt;br /&gt;&lt;br /&gt;namespace AJAXEnabledWebApplication&lt;br /&gt;{&lt;br /&gt;public class VuMgr&lt;br /&gt;{&lt;br /&gt;public static string RenderVu(string path,object data)&lt;br /&gt;{&lt;br /&gt;Page tempPage = new Page();&lt;br /&gt;UserControl cntl = (UserControl)tempPage.LoadControl(path);&lt;br /&gt;if (data != null)&lt;br /&gt;{&lt;br /&gt;Type cntltype = cntl.GetType();&lt;br /&gt;FieldInfo field = cntltype.GetField("data");&lt;br /&gt;if (field != null)&lt;br /&gt;{ field.SetValue(cntl, data); }&lt;br /&gt;else { throw new Exception( "Error : " + path + " does not have a public Data property"); }&lt;br /&gt;}&lt;br /&gt;tempPage.Controls.Add(cntl);&lt;br /&gt;&lt;br /&gt;StringWriter output = new StringWriter();&lt;br /&gt;HttpContext.Current.Server.Execute(tempPage, output, false);&lt;br /&gt;&lt;br /&gt;return output.ToString();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Here System.Reflection is used to bind the data as we have seen before. The method will be called by passing the user control path [virtual path] and the dataset as paramters. The dataset is binded to the field data on runtime. There is an exception written, it will thrown when the member used to bind the dataset is not defined as public. A page will be created on runtime and user control will be loaded on to it and we render all the contents of the page as a string and returns back that value. The service returns the same to client and this string is placed in the of the div element. We have done. You can see a tabular form of data without using any post back, update panel and server controls.[Except Script Manager]&lt;br /&gt;Below is the sample web service code&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;[System.Web.Script.Services.ScriptService]&lt;br /&gt;public class ServiceA : System.Web.Services.WebService&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;[WebMethod]&lt;br /&gt;public string HelloWorld()&lt;br /&gt;{&lt;br /&gt;return "Hello World";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;[WebMethod]&lt;br /&gt;public string GetSampleControl()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;DataSet ds = Data.getdata();&lt;br /&gt;return VuMgr.RenderVu("patient.ascx",ds);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The HTML code of web page will be&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;form id="form1" runat="server"&amp;gt;&lt;br /&gt;&amp;lt;asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"&amp;gt;&lt;br /&gt;&amp;lt;Services&amp;gt;&lt;br /&gt;&amp;lt;asp:ServiceReference Path="ServiceA.asmx" /&amp;gt;&lt;br /&gt;&amp;lt;/Services&amp;gt;&lt;br /&gt;&amp;lt;/asp:ScriptManager&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;%--&amp;lt;img src="Water lilies.jpg" onclick="TestFunction()" height="100" width="150" /&amp;gt;--%&amp;gt;&lt;br /&gt;&amp;lt;input type="button" name="ServiceButton" id ="ServiceButton" value="Click Me" onclick="TestFunction()" /&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id="ucSample"&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;br /&gt;function TestFunction()&lt;br /&gt;{&lt;br /&gt;ServiceA.GetSampleControl(responseFunction);&lt;br /&gt;}&lt;br /&gt;function responseFunction(response)&lt;br /&gt;{&lt;br /&gt;$get("ucSample").innerHTML = response;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt; &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Courier New;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;That's it. Run the application by setting the web page as a start page. click the button to see the tabular Values.. Have fun..&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-1192500594230803353?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/1192500594230803353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=1192500594230803353' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/1192500594230803353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/1192500594230803353'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/07/substitute-update-control-with-user_5479.html' title='Substitute Update Control with User Control Template'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-5923232601850410831</id><published>2007-07-17T17:05:00.000+05:30</published><updated>2007-07-17T17:34:33.867+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><title type='text'>as operator in C#</title><content type='html'>&lt;span style="font-family:verdana;"&gt;The as operator is like a cast. it only performs the reference conversions and boxing convertions, the conversion of user defined is not possible, which has to done by casting explicitly. usage of 'as' operator never raises a exception instead it yields null on conversion failure. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Internally it is equivalent to&lt;br /&gt;&lt;blockquote&gt;expression is type ? (type)expression : (type)null&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;consider a example,&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;object [] myobject = new object[5];&lt;br /&gt;myObjects[0] =&lt;br /&gt;new MyClass2();&lt;br /&gt;myObjects[1] = "hello";&lt;br /&gt;myObjects[2] = 123;&lt;br /&gt;myObjects[3] = 123.4;&lt;br /&gt;myObjects[4] = null;&lt;br /&gt;......&lt;br /&gt;for (int i=0;&lt;br /&gt;i&amp;lt;myObjects.Length; ++i)&lt;br /&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;string s = myObjects[i] as string;&lt;br /&gt;Console.Write ("{0}:", i);&lt;br /&gt;if (s != null)&lt;br /&gt;Console.WriteLine ( "'" + s + "'" );&lt;br /&gt;else &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Console.WriteLine ( "not a string" );&lt;br /&gt;} &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;/blockquote&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:verdana;"&gt;output&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;0:not a string&lt;br /&gt;1:'hello'&lt;br /&gt;2:not a string&lt;br /&gt;3:not a string&lt;br /&gt;4:not a string&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-5923232601850410831?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/5923232601850410831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=5923232601850410831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5923232601850410831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5923232601850410831'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/07/as-operator-in-c.html' title='as operator in C#'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-3869206930678193421</id><published>2007-07-09T11:25:00.000+05:30</published><updated>2007-07-09T11:39:37.925+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cryptography'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Learn'/><category scheme='http://www.blogger.com/atom/ns#' term='Configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Review'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net 2.0'/><title type='text'>Online Resources Available, Use It and Celebrate</title><content type='html'>&lt;span style="font-family:courier new;"&gt;Some of the Resource Sites, where we can learn..&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;[Contribution is not Mine, &lt;a href="http://blogs.msdn.com/walzenbach/archive/2006/11/03/asp-net-2-0-trainingsressourcen.aspx"&gt;original link&lt;/a&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET Quickstart Tutorial&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.asp.net/QuickStart/aspnet/doc/whatsnew.aspx" mce_href="http://www.asp.net/QuickStart/aspnet/doc/whatsnew.aspx"&gt;&lt;span style="font-family:courier new;"&gt;http://www.asp.net/QuickStart/aspnet/doc/whatsnew.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Virtual Labs&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/virtuallabs/asp2/" mce_href="http://msdn.microsoft.com/virtuallabs/asp2/"&gt;&lt;span style="font-family:courier new;"&gt;http://msdn.microsoft.com/virtuallabs/asp2/&lt;/span&gt;&lt;/a&gt;&lt;a href="http://msdn.microsoft.com/virtuallabs/fritzonion/" mce_href="http://msdn.microsoft.com/virtuallabs/fritzonion/"&gt;&lt;span style="font-family:courier new;"&gt;http://msdn.microsoft.com/virtuallabs/fritzonion/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;“How Do I” Video Series&lt;br /&gt;&lt;/span&gt;&lt;a href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_cache1_final.wmv" mce_href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_cache1_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Caching (Part 1)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_cache2_final.wmv" mce_href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_cache2_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Caching (Part 2)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/3/6/0/3604c3d2-0db9-4726-910d-b3b8f93a86e4/hilo_intro_final.wmv" mce_href="http://download.microsoft.com/download/3/6/0/3604c3d2-0db9-4726-910d-b3b8f93a86e4/hilo_intro_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Create a Full-Featured Customer Login Portal&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_data_final.wmv" mce_href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_data_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Data&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_contact_final.wmv" mce_href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_contact_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Form Building for a "Contact Us" Page&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/3/6/0/3604c3d2-0db9-4726-910d-b3b8f93a86e4/hilo_localization_final.wmv" mce_href="http://download.microsoft.com/download/3/6/0/3604c3d2-0db9-4726-910d-b3b8f93a86e4/hilo_localization_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Localization&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_masterpages-nav_FINAL.wmv" mce_href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_masterpages-nav_FINAL.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Master Pages and Site Navigation&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/3/6/0/3604c3d2-0db9-4726-910d-b3b8f93a86e4/hilo_membership-roles_final.wmv" mce_href="http://download.microsoft.com/download/3/6/0/3604c3d2-0db9-4726-910d-b3b8f93a86e4/hilo_membership-roles_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Membership and Roles&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/3/6/0/3604c3d2-0db9-4726-910d-b3b8f93a86e4/hilo_profile-themes_final.wmv" mce_href="http://download.microsoft.com/download/3/6/0/3604c3d2-0db9-4726-910d-b3b8f93a86e4/hilo_profile-themes_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Profiles and Themes&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_tips_final.wmv" mce_href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_tips_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Tips and Tricks&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_webparts_final.wmv" mce_href="http://download.microsoft.com/download/8/3/6/836dd5f8-fa92-499f-8219-0d326f13bf18/hilo_webparts_final.wmv"&gt;&lt;span style="font-family:courier new;"&gt;ASP.NET HOW DO I Video Series: Web Parts and Personalization&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;How-To MSDN Articles&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000007.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000007.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Configure the Machine Key in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000010.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000010.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Connect to SQL Server Using SQL Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000008.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000008.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Connect to SQL Server Using Windows Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000009.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000009.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Create a Service Account for an ASP.NET 2.0 Application&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000005.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000005.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Encrypt Configuration Sections in ASP.NET 2.0 Using DPAPI&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000006.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000006.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Encrypt Configuration Sections in ASP.NET 2.0 Using RSA&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000016.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000016.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Instrument ASP.NET 2.0 Applications for Security&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000029.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000029.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Improve Security When Hosting Multiple Applications in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000028.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000028.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Perform a Security Deployment Review for ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000004.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000004.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Prevent Cross-Site Scripting in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000012.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000012.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Protect Forms Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000003.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000003.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Protect From Injection Attacks in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000002.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000002.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Protect From SQL Injection in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000018.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000018.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use ADAM for Roles in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000019.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000019.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Authorization Manager (AzMan) with ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000017.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000017.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Code Access Security in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000026.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000026.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Forms Authentication with Active Directory in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000021.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000021.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Forms Authentication with Active Directory in Multiple Domains in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000014.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000014.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Forms Authentication with SQL Server in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000011.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000011.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Health Monitoring in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000023.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000023.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Impersonation and Delegation in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000022.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000022.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Membership in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000015.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000015.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use the Network Service Account to Access Resources in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000024.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000024.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Protocol Transition and Constrained Delegation in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000001.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000001.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Regular Expressions to Constrain Input in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000013.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000013.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Role Manager in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000025.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000025.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Windows Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Authentication and Authorization&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000010.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000010.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Connect to SQL Server Using SQL Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000008.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000008.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Connect to SQL Server Using Windows Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT04.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT04.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Create GenericPrincipal Objects with Forms Authentication&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000012.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000012.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Protect Forms Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000019.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000019.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Authorization Manager (AzMan) with ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT02.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT02.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Forms Authentication with Active Directory&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000026.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000026.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Forms Authentication with Active Directory in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000021.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000021.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Forms Authentication with Active Directory in Multiple Domains in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT03.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT03.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Forms Authentication with SQL Server 2000&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000014.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000014.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Forms Authentication with SQL Server in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000025.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000025.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Windows Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Code Access Security&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/HTCustEncr.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/HTCustEncr.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Create a Custom Encryption Permission&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000017.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000017.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Code Access Security in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/HTCode_Acc.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/HTCode_Acc.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Code Access Security Policy to Constrain an Assembly&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Code Review&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000027.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000027.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Perform a Security Code Review for Managed Code (Baseline Activity)&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Communications Security&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT13.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT13.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Call a Web Service Using Client Certificates from ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT14.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT14.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Call a Web Service Using SSL&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT16.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT16.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Set Up SSL on a Web Server&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT17.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT17.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Set Up Client Certificates&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/HTUseIPSec.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/HTUseIPSec.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use IPSec for Filtering Ports and Authentication&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT18.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT18.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use IPSec to Provide Secure Communication Between Two Servers&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT19.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT19.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use SSL to Secure Communication with SQL Server 2000&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Configuration&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT01.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT01.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Create a Custom Account To Run ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000005.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000005.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Encrypt Configuration Sections in ASP.NET 2.0 Using DPAPI&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000006.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000006.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Encrypt Configuration Sections in ASP.NET 2.0 Using RSA&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Cryptography&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT07.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT07.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Create a DPAPI Library&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT10.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT10.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Create an Encryption Library&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT11.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT11.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Store an Encrypted Connection String in the Registry&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT08.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT08.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use DPAPI (Machine Store) from ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT09.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT09.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use DPAPI (User Store) from ASP.NET with Enterprise Services&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Deployment Review&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000028.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000028.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Perform a Security Deployment Review for ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Impersonation and Delegation&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT05.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT05.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Implement Kerberos Delegation for Windows 2000&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000023.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000023.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Impersonation and Delegation in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Input and Data Validation&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000004.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000004.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Prevent Cross-Site Scripting in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000003.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000003.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Protect From Injection Attacks in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000002.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000002.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Protect From SQL Injection in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000001.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000001.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Regular Expressions to Constrain Input in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Patching and Updating&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/HTImpPatch.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/HTImpPatch.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Implement Patch Management&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;SQL Server 2000&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000010.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000010.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Connect to SQL Server Using SQL Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000008.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000008.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Connect to SQL Server Using Windows Authentication in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000002.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000002.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Protect From SQL Injection in ASP.NET&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000014.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000014.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use Forms Authentication with SQL Server in ASP.NET 2.0&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT19.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT19.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Use SSL to Secure Communication with SQL Server 2000&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Threat Modeling&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/tmwahowto.asp" mce_href="http://msdn.microsoft.com/library/en-us/dnpag2/html/tmwahowto.asp"&gt;&lt;span style="font-family:courier new;"&gt;How To: Create a Threat Model for a Web Application at Design Time&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;ATLAS (ASP.NET AJAX)&lt;br /&gt;Quickstart Developer Tasks&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ajax.asp.net/" mce_href="http://ajax.asp.net/"&gt;&lt;span style="font-family:courier new;"&gt;http://ajax.asp.net/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;“How Do I?” Videos&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ajax.asp.net/default.aspx?tabid=47&amp;subtabid=478#howdoi" mce_href="http://ajax.asp.net/default.aspx?tabid=47&amp;amp;subtabid=478#howdoi"&gt;&lt;span style="font-family:courier new;"&gt;http://ajax.asp.net/default.aspx?tabid=47&amp;subtabid=478#howdoi&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Preview Videos&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ajax.asp.net/default.aspx?tabid=47&amp;amp;subtabid=478#atlas" mce_href="http://ajax.asp.net/default.aspx?tabid=47&amp;subtabid=478#atlas"&gt;&lt;span style="font-family:courier new;"&gt;http://ajax.asp.net/default.aspx?tabid=47&amp;amp;subtabid=478#atlas&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Samples&lt;br /&gt;&lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=62605" mce_href="http://go.microsoft.com/fwlink/?LinkId=62605"&gt;&lt;span style="font-family:courier new;"&gt;http://go.microsoft.com/fwlink/?LinkId=62605&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Control Toolkit&lt;br /&gt;&lt;/span&gt;&lt;a href="http://atlas.asp.net/default.aspx?tabid=47&amp;subtabid=477" mce_href="http://atlas.asp.net/default.aspx?tabid=47&amp;amp;subtabid=477"&gt;&lt;span style="font-family:courier new;"&gt;http://atlas.asp.net/default.aspx?tabid=47&amp;subtabid=477&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;Enjoy by doing R&amp;amp;D&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-3869206930678193421?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/3869206930678193421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=3869206930678193421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3869206930678193421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3869206930678193421'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/07/online-resources-available-use-it-and.html' title='Online Resources Available, Use It and Celebrate'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-5538629564799802888</id><published>2007-06-06T16:21:00.000+05:30</published><updated>2007-06-06T23:39:18.729+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>String Functions in SQL Server</title><content type='html'>1. LEN ( string or expression )&lt;br /&gt;&lt;br /&gt;we know this function which retrives the length of the data in the column.&lt;br /&gt;&lt;br /&gt;Consider a query,&lt;br /&gt;&lt;br /&gt;SELECT LEN('sample text') &lt;br /&gt;&lt;br /&gt;returns value 11&lt;br /&gt;&lt;br /&gt;This function will work for Data types varchar(max), nvarchar(max) or varbinary(max), which return int or bigint value.&lt;br /&gt;&lt;br /&gt;2. DATALENGTH ( expression ) &lt;br /&gt;&lt;br /&gt;This is function similar to LEN, but it is especially useful with  text, image and ntext Data Types and also for varchar, varbinary and nvarchar Data Types.&lt;br /&gt;&lt;br /&gt;The DATALENGTH of NULL is NULL.&lt;br /&gt;&lt;br /&gt;we can use the LEN to find the length of string expression after casting or converting it to varchar, please note, using this may truncate real values.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-5538629564799802888?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/5538629564799802888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=5538629564799802888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5538629564799802888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5538629564799802888'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/06/string-functions-in-sql-server.html' title='String Functions in SQL Server'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-6817352248613763368</id><published>2007-06-06T15:15:00.000+05:30</published><updated>2007-06-06T15:32:02.161+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><title type='text'>VB .NET New Logical Operators AndAlso and OrElse</title><content type='html'>Vb.Net has introduced two new logical operators &lt;strong&gt;AndAlso&lt;/strong&gt; and &lt;strong&gt;OrElse&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;These operators basically works like And and Or of VB6.0&lt;br /&gt;&lt;br /&gt;The speciality of this the performance of the operators, consider a statement involving two conditions.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;if ((2&gt;3) AndAlso (4&gt;3)) Then&lt;br /&gt;'...&lt;br /&gt;'Body of the section&lt;br /&gt;'...&lt;br /&gt;End If&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Here, In the statement the first condition is false, let the second condition may true or false, the if block will not go to the then section , since we are using And operator. so either checking or not checking the second condition doesn't have a effect here, so the New Operator AndAlso stops checking the second condition and proceeds. this increases the performance in Logic and efficiency in Code.&lt;br /&gt;&lt;br /&gt;Similarly the operator OrElse works in the same manner.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;if ((2&lt;3) OrElse (4&gt;3)) Then&lt;br /&gt;'...&lt;br /&gt;'Body of the section&lt;br /&gt;'...&lt;br /&gt;End If&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Here, the first condition is true, so no verification of second condition is not required as we are using the Or operator, so it skips the second condition and proceeds.&lt;br /&gt;&lt;br /&gt;Thanks to the Creators...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-6817352248613763368?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/6817352248613763368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=6817352248613763368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6817352248613763368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/6817352248613763368'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/06/vb-net-new-logical-operators-andalso.html' title='VB .NET New Logical Operators AndAlso and OrElse'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-7088194669824090527</id><published>2007-06-05T16:41:00.001+05:30</published><updated>2007-06-06T13:16:34.643+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='B&apos;day'/><title type='text'>Friends BirthDay</title><content type='html'>&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/yj6cbM-h8xg"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/yj6cbM-h8xg" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Many Many Happy Returns Dear&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-7088194669824090527?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/7088194669824090527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=7088194669824090527' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7088194669824090527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/7088194669824090527'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/06/blog-post.html' title='Friends BirthDay'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-5901720276177264925</id><published>2007-05-08T10:47:00.000+05:30</published><updated>2007-05-08T10:57:14.145+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Remove Columns from HTML table</title><content type='html'>This functions scans all the child nodes of the Table tag and delete the TD tag  element depending on the column number specified.&lt;br /&gt;&lt;br /&gt;function RemoveColumn()&lt;br /&gt;{&lt;br /&gt;var row, columnCount;&lt;br /&gt;//send as parameter if it is dynamic value.&lt;br /&gt;var columnToRemove = 1;&lt;br /&gt;var tbody = document.getElementById('myTableBody');&lt;br /&gt;for (var i = 0; i &lt; tbody.rows.length; i++) {&lt;br /&gt;row = tbody.rows[i];&lt;br /&gt;columnCount = 0;&lt;br /&gt;for (var j = 0; j &lt; row.childNodes.length; j++) {&lt;br /&gt;if (row.childNodes[j].nodeName == 'TD') {&lt;br /&gt;if (columnCount == columnToRemove) {&lt;br /&gt;row.removeChild(row.childNodes[j]);&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;columnCount++;&lt;br /&gt;} } } }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-5901720276177264925?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/5901720276177264925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=5901720276177264925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5901720276177264925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/5901720276177264925'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/05/remove-columns-from-html-table.html' title='Remove Columns from HTML table'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2447833955317506069.post-3210397707375531735</id><published>2007-04-20T14:48:00.000+05:30</published><updated>2007-06-06T23:39:43.754+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>SQL Server</title><content type='html'>while using joins, Please remenber the keypoints,&lt;br /&gt;&lt;br /&gt;1. use the primary key column and foreign key column of the table to create the join.&lt;br /&gt;  eg: EmpDeptID in Employee table with DeptID in Department table&lt;br /&gt;&lt;br /&gt;2. the usage of other columns in the join will affect the performance of the query.&lt;br /&gt;&lt;br /&gt;3. never use a variable in join condition, try to rewrite the same query with different join condition and use variable in the where.&lt;br /&gt;  eg: SELECT column1, colomn2 FROM Table1 T1 join Table2 T2&lt;br /&gt;         on T1.Col1 = T2.Col1 AND T1.Col2 = @Variable&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2447833955317506069-3210397707375531735?l=asithangae.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asithangae.blogspot.com/feeds/3210397707375531735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2447833955317506069&amp;postID=3210397707375531735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3210397707375531735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2447833955317506069/posts/default/3210397707375531735'/><link rel='alternate' type='text/html' href='http://asithangae.blogspot.com/2007/04/sql-server.html' title='SQL Server'/><author><name>asithangae</name><uri>http://www.blogger.com/profile/17545384033751292086</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_qYrOQxKromw/TAqGWlkFRnI/AAAAAAAAITs/9UMx8FmIAOA/S220/buddha06.jpg'/></author><thr:total>0</thr:total></entry></feed>
