<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-16754652</atom:id><lastBuildDate>Wed, 19 Aug 2026 22:44:13 +0000</lastBuildDate><category>SQL Server</category><category>.Net</category><category>Android</category><category>CLR</category><category>Cricket</category><category>Development</category><category>ImageButton</category><category>ListView</category><title>Down Memory Lane</title><description></description><link>http://nalakahewage.blogspot.com/</link><managingEditor>noreply@blogger.com (Nalaka)</managingEditor><generator>Blogger</generator><openSearch:totalResults>51</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-5325453199921174245</guid><pubDate>Fri, 09 Aug 2013 09:38:00 +0000</pubDate><atom:updated>2013-08-09T15:55:50.821+06:00</atom:updated><title>WHERE clause with multiple AND operators for the same column-[changed]</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This relates to the earlier post. The developer wanted to eliminate those records if there are more than one&amp;nbsp;&lt;b style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: italic; line-height: 18px;&quot;&gt;MailGroup_FKey &lt;/b&gt;&lt;b style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;which satisfy the condition. So the SQL changed,&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;SELECT *&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;FROM MailAddress_MailGroup&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;WHERE &amp;nbsp;MailGroup_FKey IN (&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT MailGroup_FKey FROM MailAddress_MailGroup&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WHERE MailAddress_FKey IN (6,7) AND&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;(SELECT COUNT(*) FROM (SELECT MailGroup_FKey &amp;nbsp;FROM MailAddress_MailGroup&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;WHERE MailAddress_FKey IN (6,7)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;GROUP BY MailGroup_FKey&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HAVING COUNT(*) = 2))=1&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GROUP BY MailGroup_FKey&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;HAVING COUNT(*) = 2 AND COUNT(DISTINCT MailGroup_FKey)=1&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;) AND MailAddress_FKey IN (6,7)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2013/08/where-clause-with-multiple-and_9.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-943081562742993042</guid><pubDate>Wed, 07 Aug 2013 09:04:00 +0000</pubDate><atom:updated>2013-08-09T15:57:01.973+06:00</atom:updated><title>WHERE clause with multiple AND operators for the same column</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYxJFD0bxgrbhbVE6m_rxxZ68j6q7SAWaJPNqDvawacu-1ZOOaxX7yGksDYKOlQeBE6RbyBHEyvPd7mqNo8qCraN01D-CsWKUA1-wdWzZhAx-YG10PUbVWF-xxisL7HR7DnOrXMA/s1600/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;166&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYxJFD0bxgrbhbVE6m_rxxZ68j6q7SAWaJPNqDvawacu-1ZOOaxX7yGksDYKOlQeBE6RbyBHEyvPd7mqNo8qCraN01D-CsWKUA1-wdWzZhAx-YG10PUbVWF-xxisL7HR7DnOrXMA/s320/Capture.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Here the developer wanted to pass &lt;b&gt;n&lt;/b&gt; number of values for the &lt;i style=&quot;font-weight: bold;&quot;&gt;MailAddress_Key &lt;/i&gt;column&amp;nbsp;and return all the records which has all the values for the same MailGroup_FKey.&lt;br /&gt;
&lt;br /&gt;
If values 6,7,1 passed, it should return all the records which satisfy that criteria if it&#39;s satisfied by individual &lt;b&gt;&lt;i&gt;MailGroup_Key&lt;/i&gt;&lt;/b&gt;(s). In the example &lt;b style=&quot;font-style: italic;&quot;&gt;MailGroup_FKey &lt;/b&gt;2 and 3 both satisfy the criteria and it should return the relevant records of&amp;nbsp;&lt;b style=&quot;font-style: italic;&quot;&gt;MailGroup_FKey &lt;/b&gt;2 and 3&lt;br /&gt;
&lt;br /&gt;
Here&#39;s the SQL&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;SELECT *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;FROM MailAddress_MailGroup&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;WHERE &amp;nbsp;MailGroup_FKey IN (&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT MailGroup_FKey FROM MailAddress_MailGroup&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WHERE MailAddress_FKey IN (6,7,1)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GROUP BY MailGroup_FKey&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;HAVING COUNT(*) = 3&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;) AND MailAddress_FKey IN (6,7,1)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2013/08/where-clause-with-multiple-and.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYxJFD0bxgrbhbVE6m_rxxZ68j6q7SAWaJPNqDvawacu-1ZOOaxX7yGksDYKOlQeBE6RbyBHEyvPd7mqNo8qCraN01D-CsWKUA1-wdWzZhAx-YG10PUbVWF-xxisL7HR7DnOrXMA/s72-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-2840127956094715161</guid><pubDate>Wed, 19 Dec 2012 11:27:00 +0000</pubDate><atom:updated>2012-12-20T11:02:21.066+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Android</category><category domain="http://www.blogger.com/atom/ns#">ImageButton</category><category domain="http://www.blogger.com/atom/ns#">ListView</category><title>Android: ListView custom layout with ImageButton of android:focusable=&quot;false&quot;</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Here I have customized the layout of a ListView. A ListItem is constructed by a TextView and a ImageButton. By default the ImageButton is invisible. I have OnItemLongClickListener implemented in the activity and make the button visible on onItemLongClick. Under the normal scenario everything works fine until you set the visibility to visible of the ImageButton. When you set the visibility to visible you won&#39;t be able to click on that particular ListItem anymore.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtH0pBrjILODLmdFr8tTwc01do1q12QEhJWbq-Ql_3l23zM-rw75jbL2_9NCnjycuj-ZeV8xdR7X0i9xp7j2Ymu7VIx08qT8DtWuAs_kUnmhYzOCEexhLRW_v1-iiBPpz-43y6HA/s1600/lv.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;173&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtH0pBrjILODLmdFr8tTwc01do1q12QEhJWbq-Ql_3l23zM-rw75jbL2_9NCnjycuj-ZeV8xdR7X0i9xp7j2Ymu7VIx08qT8DtWuAs_kUnmhYzOCEexhLRW_v1-iiBPpz-43y6HA/s320/lv.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; text-align: justify;&quot;&gt;This particular behavior is caused by the ImageButton. Reason for this is one particular property of the ImageButton which is&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;android:focusable. &lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;By default this is true and you have to set this to false. But the tricky part is it doesn&#39;t work when you set the property in the xml layout as&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;android:focusable=&quot;false&quot;.&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; text-align: justify;&quot;&gt;The Reason behind this is&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-style: italic; text-align: justify;&quot;&gt;android:focusable &lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; text-align: justify;&quot;&gt;gets&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; text-align: justify;&quot;&gt;overwritten and set to true&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; text-align: justify;&quot;&gt;&amp;nbsp;by the ImageButton&#39;s constructor. So if you want to set&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; text-align: justify;&quot;&gt;android:focusable=&quot;false&quot;&lt;/i&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; text-align: justify;&quot;&gt;, do it in the java file instead of doing it in the xml layout file and you have to set&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b style=&quot;font-style: italic;&quot;&gt;android:focusable=&quot;false&quot; &lt;/b&gt;in these kinds of situations otherwise you&#39;ll face the above mentioned (mis)behavior.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2012/12/android-listview-custom-layout-with.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtH0pBrjILODLmdFr8tTwc01do1q12QEhJWbq-Ql_3l23zM-rw75jbL2_9NCnjycuj-ZeV8xdR7X0i9xp7j2Ymu7VIx08qT8DtWuAs_kUnmhYzOCEexhLRW_v1-iiBPpz-43y6HA/s72-c/lv.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-7512272420409221263</guid><pubDate>Fri, 06 Jul 2012 11:22:00 +0000</pubDate><atom:updated>2012-07-06T17:22:33.374+06:00</atom:updated><title>AJAX</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;AJAX&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; - Asynchronous Javascript + XML&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;AJAX is not a one new technology or a language. It&#39;s just a way of using a set existing standards and technologies. It&#39;s all about updating a parts of the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;web pages by exchanging data with the server without reloadng(postback) the whole page. Rather than reloading the whole page parts of the web page does&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;callbacks to the server. There are no any prerequisites (additional tools or software) to use AJAX in one of your web pages you just have to know how to&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;write some code in javascript.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;XMLHttpRequest(XHR) - API in web scripting languages such as JavaScript to send direct HTTP/HTTPS requests to the server and return the response back to the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;script.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;The example below shows how to update a part of a web page without reloding the whle page(postback). The AJAX script or the code to implement the scenario&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;is written in Javascript.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Creating a XMLHttpRequest Object&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;xmlhttp = &lt;span style=&quot;color: blue;&quot;&gt;new &lt;/span&gt;XMLHttpRequest();&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This is the basic syntax for creating a XMLHttpRequest object. This syntax might differ for older versions of some of the browsers.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;xmlhttp =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new &lt;/span&gt;ActiveXObject(&lt;span style=&quot;color: #cc0000;&quot;&gt;&quot;Microsoft.XMLHTTP&quot;&lt;/span&gt;); - for IE 5 and 6&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Request&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Request can be sent to the server by using open and send methods of the XMlHttpRequest object.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;xmlhttp.open(&lt;span style=&quot;color: #cc0000;&quot;&gt;&quot;GET&quot;&lt;/span&gt;, &lt;span style=&quot;color: #cc0000;&quot;&gt;&quot;movie_catalog.xml&quot;&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;xmlhttp.send();&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;There are 3 parameters passed to the open method.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;method&lt;/i&gt; - Request type. This can be either GET or POST&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;url&lt;/i&gt; - Location of the file which is in the server where the response is returned from&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;async&lt;/i&gt; - asynchronous or not (true - asynchronous)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Response&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;There are 2 properties which can be used to get the response from the server.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;responseText&lt;/i&gt; - when the response is in string format.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;responseXML&lt;/i&gt; - when the response is in XML format.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;onreadystatechange&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;A function can be stored in this property and it is called everytime when the readyState property of the XMLHttpRequest object changes.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;readyState&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This holds the status of the request object which ranges from 0 to 4&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;0&lt;/i&gt;: request is not initialized&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;1&lt;/i&gt;: connection established to the server&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;2&lt;/i&gt;: request received&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;3&lt;/i&gt;: request processing&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;4&lt;/i&gt;: response is ready&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;status&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This holds standard HTTP status codes returned by the request&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;E.g:-&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;200&lt;/i&gt;: OK&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;403&lt;/i&gt;: Forbidden&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;i&gt;404&lt;/i&gt;: Not Found&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Example 1 : Get the content from a text file which is located in the server and display in a part of the web page.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLecluXz-jXvDdOpaDnnpqgQKr7l6k4gIvnkGhqF1JEEqIJwXNTIp48zj4oLVDKBZ9CcsvVrdE9aR9Hr76BR6crf1lj11LKWuZgVQASgPZ_7WbuKiXm6gcXqCvqpeLXIe2Pn3x4A/s1600/examle1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLecluXz-jXvDdOpaDnnpqgQKr7l6k4gIvnkGhqF1JEEqIJwXNTIp48zj4oLVDKBZ9CcsvVrdE9aR9Hr76BR6crf1lj11LKWuZgVQASgPZ_7WbuKiXm6gcXqCvqpeLXIe2Pn3x4A/s1600/examle1.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhADznkhflJFIVSjZf-B-oVE3qChMCANphdoi-9TgINgZS4WOXELySpe6hBFQtQPHqMvr1mhSLzx67b80e4jII_3fTMB_FVya4dUjrA1DKjPyUmXk4M88ZK78Euo9QWvOI1xrM6yQ/s1600/example11.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhADznkhflJFIVSjZf-B-oVE3qChMCANphdoi-9TgINgZS4WOXELySpe6hBFQtQPHqMvr1mhSLzx67b80e4jII_3fTMB_FVya4dUjrA1DKjPyUmXk4M88ZK78Euo9QWvOI1xrM6yQ/s1600/example11.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Example 2 : Get the content from a XML file which is located in the server and disply in a part of the web page&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVYQDQqHZbUFFqsr3Wc3tRlPXhw2vnt0mhHptBZD6u0Cp2mILAPRneii3L6f9G0DS-LmJg3g23k_vkL0DghMIJs8y-RFWWtZSSjfUAXhCrMMqZFp4AXQTu9DM27txIC20Z61eNQQ/s1600/example2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVYQDQqHZbUFFqsr3Wc3tRlPXhw2vnt0mhHptBZD6u0Cp2mILAPRneii3L6f9G0DS-LmJg3g23k_vkL0DghMIJs8y-RFWWtZSSjfUAXhCrMMqZFp4AXQTu9DM27txIC20Z61eNQQ/s1600/example2.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR5t54EY9PXLDJNkJ90X5J7Kr13Tf1jgjWVHzXy3RJdW-vUHzIIkP03zkHaUFdXo1Jxs2HT1VY452OxF0ltYeSukFi36i6L0noOIepJ4HylF5ICOdsnEfYOKOlOWfMdnhdDSu87Q/s1600/example22.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR5t54EY9PXLDJNkJ90X5J7Kr13Tf1jgjWVHzXy3RJdW-vUHzIIkP03zkHaUFdXo1Jxs2HT1VY452OxF0ltYeSukFi36i6L0noOIepJ4HylF5ICOdsnEfYOKOlOWfMdnhdDSu87Q/s1600/example22.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Example 3 : Get the response another web page which is located in the server.&lt;/span&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT7RuhVpDvYqxGfIfo9WMClyTRokfuGqjiSsZDO0yDRRyxaDXxCozsKnyYaHQFfnnXwLicjl73Y2gF52pYP057aFg9tLraSeaC3hmPRbZuwTYvNNFKkuJWI_8FW-ieKdbaXxi7kA/s1600/example3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT7RuhVpDvYqxGfIfo9WMClyTRokfuGqjiSsZDO0yDRRyxaDXxCozsKnyYaHQFfnnXwLicjl73Y2gF52pYP057aFg9tLraSeaC3hmPRbZuwTYvNNFKkuJWI_8FW-ieKdbaXxi7kA/s1600/example3.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpfxmH2oLO9YrdvJG8FmZnC5fnvY7s8ck_46yDBVWqVDbSbyYUuBr41LyfMMxttrLkOzBTtIubjgbxauhINqxwwX76-ENG3X-9RjlGlgEmp11iZgXsBbxeMPqA1xcLllmNzopYvw/s1600/example33.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpfxmH2oLO9YrdvJG8FmZnC5fnvY7s8ck_46yDBVWqVDbSbyYUuBr41LyfMMxttrLkOzBTtIubjgbxauhINqxwwX76-ENG3X-9RjlGlgEmp11iZgXsBbxeMPqA1xcLllmNzopYvw/s1600/example33.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2012/07/ajax.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLecluXz-jXvDdOpaDnnpqgQKr7l6k4gIvnkGhqF1JEEqIJwXNTIp48zj4oLVDKBZ9CcsvVrdE9aR9Hr76BR6crf1lj11LKWuZgVQASgPZ_7WbuKiXm6gcXqCvqpeLXIe2Pn3x4A/s72-c/examle1.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-8137650623442595096</guid><pubDate>Thu, 05 Jul 2012 11:19:00 +0000</pubDate><atom:updated>2012-07-05T17:19:16.058+06:00</atom:updated><title>ScriptManager.RegisterDataItem Method (Control, String)</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;How can you update a control which resides outside the update panel in an asynchronous&amp;nbsp;post back?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;You can use ScriptManager.RegisterDataItem to send data from the server to client whether the response control is inside the update panel or not. RegisterDataItem method can be called only during an asynchronous postbacks. The data item which is registered with the RegisterDataItem method can be accessed through the client script in&amp;nbsp;&amp;nbsp;pageLoading, pageLoaded, and endRequest events of the PageRequestManager object. When you handle the event, custom data is passed in an event argument object. If you have a handler for&amp;nbsp;pageLoaded event, customer data is passed in the&amp;nbsp;PageLoadedEventArgs class which exposed dataitems property.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirXI-Y9bMFjr-Tdamq6TDKlAywXysd99eVpaivDcp2rxy_2nksph7Jj-XMNRP_SBNm4QPLw7l_Kx5ZVVExsfhDA9n3WSOqZeMq7dMWk2u0WrPa4kNenr18hiEiYGWgFarJueKXRw/s1600/html.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirXI-Y9bMFjr-Tdamq6TDKlAywXysd99eVpaivDcp2rxy_2nksph7Jj-XMNRP_SBNm4QPLw7l_Kx5ZVVExsfhDA9n3WSOqZeMq7dMWk2u0WrPa4kNenr18hiEiYGWgFarJueKXRw/s1600/html.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirXI-Y9bMFjr-Tdamq6TDKlAywXysd99eVpaivDcp2rxy_2nksph7Jj-XMNRP_SBNm4QPLw7l_Kx5ZVVExsfhDA9n3WSOqZeMq7dMWk2u0WrPa4kNenr18hiEiYGWgFarJueKXRw/s1600/html.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvcfDOxmVxVU_WmWC4gi43_NZpjHl2r5O2HCAoUpUeknZpdMxwicHlLMLZoF2ALXmNmeZWBWr6QF1k-Gzh1xR_EZCb-KzK3nE0jLkbRGoVcQvEiD0BsR0VPuWaDyoQz_gzP6WWCQ/s1600/serv.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvcfDOxmVxVU_WmWC4gi43_NZpjHl2r5O2HCAoUpUeknZpdMxwicHlLMLZoF2ALXmNmeZWBWr6QF1k-Gzh1xR_EZCb-KzK3nE0jLkbRGoVcQvEiD0BsR0VPuWaDyoQz_gzP6WWCQ/s1600/serv.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2012/07/scriptmanagerregisterdataitem-method.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirXI-Y9bMFjr-Tdamq6TDKlAywXysd99eVpaivDcp2rxy_2nksph7Jj-XMNRP_SBNm4QPLw7l_Kx5ZVVExsfhDA9n3WSOqZeMq7dMWk2u0WrPa4kNenr18hiEiYGWgFarJueKXRw/s72-c/html.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-5387708950858096380</guid><pubDate>Wed, 04 Jul 2012 08:05:00 +0000</pubDate><atom:updated>2012-07-04T14:05:30.437+06:00</atom:updated><title>Named and Optional Parameters</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Named and optional parameters have been there for Visual Basic for sometime but haven&#39;t been available in C# until the version 4 release. Name parameters allow you to pass parameters by the parameter names disregarding the order of parameters in the method signature. Optional parameters allow you to provide default values for some of the parameters in your method.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;Named Parameters&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin1DROpAiGsCwYeSe02QmIgtyesM8bYcqEQUvJfFzdomtipwE9OUOKgSVmx3Su3ArsvMEvbHmMFYg9AAchr5KC1EYONXivniHoxrA1mlYL8uhqShH_ZAtopBM_cJuEZkte2NlU-g/s1600/named.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin1DROpAiGsCwYeSe02QmIgtyesM8bYcqEQUvJfFzdomtipwE9OUOKgSVmx3Su3ArsvMEvbHmMFYg9AAchr5KC1EYONXivniHoxrA1mlYL8uhqShH_ZAtopBM_cJuEZkte2NlU-g/s1600/named.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOnAlUnCqfFo3dg72wjm8X_khYFvPly-iABrozWSvG6mfv7QEI7cL_wcVUf5_zMsOPf7p_TpUbu1gpGKPl34vwBytkciV534mFyMu9fh0ub0ukp4o3FZzWXhliODYP89o-Vpu6_g/s1600/named+out.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOnAlUnCqfFo3dg72wjm8X_khYFvPly-iABrozWSvG6mfv7QEI7cL_wcVUf5_zMsOPf7p_TpUbu1gpGKPl34vwBytkciV534mFyMu9fh0ub0ukp4o3FZzWXhliODYP89o-Vpu6_g/s1600/named+out.JPG&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;u&gt;Optional Parameters&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Optional parameters allow you to provide default values for some of the parameters in your method and acts as a type of overloading. If you want to add one or more new parameter to one of your existing methods and you still need the existing functionality to behave as it is and the new parameters doesn&#39;t effect the existing functionality, the solutions is to repeat the same method with the additional parameters and a different method body. This is called overloading.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;If you use optional parameters for this purpose you can add the extra parameters as default parameters and handle those in the existing method body. You don&#39;t have to add a new method or modify the code where the existing method was called.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2sn3GzEbKUOqYVy86jEVoa5ydAEtQG37lCOgeYzedrfOSQZ57QmYYtuF-JTODgkMUjH_07gBQl0Bj2GIhIu32fvj50XhCk7iAZxtbtSjRnIQQu7orMwTQ2BI-5Ylzkhy4E8PwOw/s1600/opt.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2sn3GzEbKUOqYVy86jEVoa5ydAEtQG37lCOgeYzedrfOSQZ57QmYYtuF-JTODgkMUjH_07gBQl0Bj2GIhIu32fvj50XhCk7iAZxtbtSjRnIQQu7orMwTQ2BI-5Ylzkhy4E8PwOw/s1600/opt.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBG8UqDgO-JX0jH7gzNPDamp7ox4cfL7Arf6PHVdFtyzSgeIO-1DvHl9yLukwcz-blHTBMDHON24U7-YaxzaBtlMoLbQSvRAppVhTbk3KyAqvi-snsgk2BeRGmqJTzcak-FBMGFw/s1600/opt+out.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBG8UqDgO-JX0jH7gzNPDamp7ox4cfL7Arf6PHVdFtyzSgeIO-1DvHl9yLukwcz-blHTBMDHON24U7-YaxzaBtlMoLbQSvRAppVhTbk3KyAqvi-snsgk2BeRGmqJTzcak-FBMGFw/s1600/opt+out.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2012/07/named-and-optional-parameters.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin1DROpAiGsCwYeSe02QmIgtyesM8bYcqEQUvJfFzdomtipwE9OUOKgSVmx3Su3ArsvMEvbHmMFYg9AAchr5KC1EYONXivniHoxrA1mlYL8uhqShH_ZAtopBM_cJuEZkte2NlU-g/s72-c/named.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-2713796464927278789</guid><pubDate>Mon, 02 Jul 2012 09:21:00 +0000</pubDate><atom:updated>2012-07-02T17:12:43.096+06:00</atom:updated><title>.Net: Instantiating</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9RyWuM4ZEeMAswxoBKYxxgn2rX_DsDMkOl0Qkvtzr6r8GowKeyCn-3q5xr2cLFs2qLZWUcLL8FzxK4f2GcyKqgd1i7e2ocR4USJwnend5CQlgHib0wimdrFtEhMNSTV1TiSUmmg/s1600/blog3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;background-color: white; clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9RyWuM4ZEeMAswxoBKYxxgn2rX_DsDMkOl0Qkvtzr6r8GowKeyCn-3q5xr2cLFs2qLZWUcLL8FzxK4f2GcyKqgd1i7e2ocR4USJwnend5CQlgHib0wimdrFtEhMNSTV1TiSUmmg/s1600/blog3.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;When instantiating classes, the class which is on the left side of the equation is called the declarative class and the class which is on the right side is called the instantiating class.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzdYhfG4a1ydZrsQYXujrkchAHOFVZ9E4Sf4kVmnUVh1D3unKItvkK513K8GgnAgYT8A9LTnVH-ze3WX7F8rhO1oHDgKHsIa7PKFJRpbu_n8tlbXrMzcHQBnAo2ag0i1iY6RfUEg/s1600/blog1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzdYhfG4a1ydZrsQYXujrkchAHOFVZ9E4Sf4kVmnUVh1D3unKItvkK513K8GgnAgYT8A9LTnVH-ze3WX7F8rhO1oHDgKHsIa7PKFJRpbu_n8tlbXrMzcHQBnAo2ag0i1iY6RfUEg/s1600/blog1.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUuslbGzIcyBR4Ge8eXqA0VanSiluMCWSY2YTsLjm7VLte6Mk9d8Gj1JpxVf27EYBEDig30_UrBjt7iLCSp95zj9MyfZMBw4frYj5lo68hruvXQzMka8kTiYKEwyzVao30bAO0sw/s1600/blog2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUuslbGzIcyBR4Ge8eXqA0VanSiluMCWSY2YTsLjm7VLte6Mk9d8Gj1JpxVf27EYBEDig30_UrBjt7iLCSp95zj9MyfZMBw4frYj5lo68hruvXQzMka8kTiYKEwyzVao30bAO0sw/s1600/blog2.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Base class called &quot;Animal&quot; contains 2 methods as&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;public void Eat()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;public void Sleep()&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Sub class called &quot;Lion&quot; which derived from &quot;Animal&quot; contains 2 new methods as&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;public void Hunt()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;public void Walk()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0lyXrnOEqUNf-G1tt7lpOUV0fzsV4LNNSojDiLsqv2YcAWa4xU35i6wtVI4TQMe_PUeJAma847-bNhMcyjtV4OflFn3YFzZbpY4pr9FVj0PjSMjewYYmyC_7tsj-KhjNMVB-G4A/s1600/blog4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0lyXrnOEqUNf-G1tt7lpOUV0fzsV4LNNSojDiLsqv2YcAWa4xU35i6wtVI4TQMe_PUeJAma847-bNhMcyjtV4OflFn3YFzZbpY4pr9FVj0PjSMjewYYmyC_7tsj-KhjNMVB-G4A/s1600/blog4.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;When instantiating with base class as the declarative class and the derived class as the instantiating class, what will be structure of the instance? You&#39;ll see it carried 2 public methods of the base class. Actually this instance will carry all the methods, properties and variables from base class (according to encapsulation and other object oriented principles). This will not relevant if you override or shadow the base class methods.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2012/07/net-instantiating.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9RyWuM4ZEeMAswxoBKYxxgn2rX_DsDMkOl0Qkvtzr6r8GowKeyCn-3q5xr2cLFs2qLZWUcLL8FzxK4f2GcyKqgd1i7e2ocR4USJwnend5CQlgHib0wimdrFtEhMNSTV1TiSUmmg/s72-c/blog3.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-476142481917637638</guid><pubDate>Tue, 26 Jun 2012 04:46:00 +0000</pubDate><atom:updated>2012-06-26T10:47:42.103+06:00</atom:updated><title>SQL Server : How to escape single quote</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Case : If you have developed a dynamic search by constructing a sql statement according to user inputs captured through several input controls in your application and one or more of those controls allow single quote as a part of the input string, your dynamically built sql statement will break in to several parts as a result of improperly formatted quote strings in the statement. The simplest solution is to replace the quote(&#39;) string with 2 quote strings(&#39;&#39;).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;declare &lt;/span&gt;@find &lt;span style=&quot;color: blue;&quot;&gt;nvarchar&lt;/span&gt;(5);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;declare &lt;/span&gt;@replace &lt;span style=&quot;color: blue;&quot;&gt;nvarchar&lt;/span&gt;(5);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;declare &lt;/span&gt;@text &lt;span style=&quot;color: blue;&quot;&gt;nvarchar&lt;/span&gt;(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;set &lt;/span&gt;@find = &lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;(39);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;set &lt;/span&gt;@replace = &lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;(39)+&lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;(39);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;set &lt;/span&gt;@text = &lt;span style=&quot;color: red;&quot;&gt;&#39;nalaka&#39;&lt;/span&gt;+&lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;(39)+&lt;span style=&quot;color: red;&quot;&gt;&#39;s&#39;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;set &lt;/span&gt;@text = &lt;span style=&quot;color: magenta;&quot;&gt;replace&lt;/span&gt;(@text, @find, @replace)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;set &lt;/span&gt;@text = &lt;span style=&quot;color: red;&quot;&gt;&#39;select &#39;&#39;&#39;&lt;/span&gt; + @text + &lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&#39; where getdate() = getdate()&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;exec&lt;/span&gt;(@text)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2012/06/sql-server-how-to-escape-single-quote.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-5371258182219581845</guid><pubDate>Wed, 06 Jul 2011 05:46:00 +0000</pubDate><atom:updated>2011-07-06T12:40:19.245+06:00</atom:updated><title>Undo a check out being done by another user</title><description>You may come across situations where you want to undo or check in a change done by another user from his work space. This might be because that user has left the organization and you can&#39;t log in to his work space, or the user has re-installed the machine and no longer using the previous work space etc...&lt;div&gt;&lt;br /&gt;&lt;div&gt;In earlier versions(Microsoft Visual Source Safe) you can achieve this by logging in from the Admin account and undo other&#39;s changes as the Admin. But the Visual Studio Team Foundation Server, you don&#39;t have the GUI to achieve this. So you&#39;ll have to use the Visual Studio Command Prompt.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You just have to do is Open the Visual Studio Command Prompt (no need to log in to the Team Foundation Server), and provide the relevant command.  You have to specify few parameters to the command and they are;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- Operation needs to be done (e.g:- undo, check out, etc...)&lt;/div&gt;&lt;div&gt;- Work space and the user name of the user who has checked out the item.&lt;/div&gt;&lt;div&gt;- Location/path of the item which in being checked out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Herewith I have attached a screenshot of the command in my case.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWGNMoBV4CqP8hC-Css2IEj97GAqZOf5Dxwk6cn4l4kvIMNzcZgwf6cMiPv-6WNOwNWKQ2V_0yVOKBZG9V6rZO_Di-XzwcooRy4oodU8GaTMZn_-z4NgNwfBBy17alDgUP2vsw8w/s1600/tfs.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 700px; height: 350px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWGNMoBV4CqP8hC-Css2IEj97GAqZOf5Dxwk6cn4l4kvIMNzcZgwf6cMiPv-6WNOwNWKQ2V_0yVOKBZG9V6rZO_Di-XzwcooRy4oodU8GaTMZn_-z4NgNwfBBy17alDgUP2vsw8w/s400/tfs.JPG&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5626124988846066546&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cheers!&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2011/07/undo-check-out-being-done-by-another.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWGNMoBV4CqP8hC-Css2IEj97GAqZOf5Dxwk6cn4l4kvIMNzcZgwf6cMiPv-6WNOwNWKQ2V_0yVOKBZG9V6rZO_Di-XzwcooRy4oodU8GaTMZn_-z4NgNwfBBy17alDgUP2vsw8w/s72-c/tfs.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-3787481824776188744</guid><pubDate>Thu, 02 Sep 2010 09:04:00 +0000</pubDate><atom:updated>2012-07-10T13:53:01.351+06:00</atom:updated><title>Using Microsoft Data Access Application Block</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Information access has become a major part when you are designing current day applications. There are fair reasons for this because you may live in a agile world or you have to be part of it. In that case time will be the most critical factor. In the other hand you&#39;ll have to consider the performance because it will be one of the most important factors when defining the success of your project or application. The bottom line is you have to invest minimum development time to gain a fair amount of performance when designing you application.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Fortunately I was not forced to agile process by my current environment but when I was designing the Data access layer of my new project, I was thinking about these 2 factors and finally decided to use Microsoft enterprise data access application blocks when designing the data access layer. I don&#39;t expect to talk about the advantages of enterprise data access application blocks or compare it with other technologies in this post but main points are it doesn&#39;t have performance issues in LINQ to SQL or EF like so much of cost/time it takes to view generation. Anyway according to my experience using an ORM reduces your development time but it gives you other headaches like performance issues and less flexibility when it comes to maintenance in the long run.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Enterprise data access application block is a well-tested data access layer. It manages the database connections pretty well and it doesn’t have any memory leaks so it&#39;s performance is quite good and It&#39;s easy to integrate to your application. Most of all with entlib 5.0 provides some ORM like features.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;How to use Enterprise data access application block in your application&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can download the enterprise application blocks from &lt;a href=&quot;http://entlib.codeplex.com/&quot;&gt;codeplex&lt;/a&gt;. Then refer it in your application. Use the configuration tool or just add the relevant entries to web.config.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWTlF2fjyDCUalES78vGtLe1PZXVg8Cz4nXwfI8Ik6_Qde1-vm1tkVEeKoHWHwjALtwHaZjk6b4KX4QSltyu7V7TTLvDnvsdKk9hp82V9tl_iyOK4SJuQqBUsUWW2LdW_4N04b-Q/s1600/config.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5512279205596785634&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWTlF2fjyDCUalES78vGtLe1PZXVg8Cz4nXwfI8Ik6_Qde1-vm1tkVEeKoHWHwjALtwHaZjk6b4KX4QSltyu7V7TTLvDnvsdKk9hp82V9tl_iyOK4SJuQqBUsUWW2LdW_4N04b-Q/s400/config.JPG&quot; style=&quot;cursor: pointer; float: left; height: 68px; margin: 0pt 10px 10px 0pt; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can create an instance from Database class in entlib. This class consists of all 4 major methods you need to do database calls (ExecuteDataSet, ExecuteNonQuery, ExecuteReader, ExecuteScalar). You can execute SQL statements or stored procedures by using each of these methods.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Executing SQL statement&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ-a-h5b_aPuEu3m9COr6IJi3CWxyOdcS7qiZQrbHkmQHwhmld-hMMczum1wHyajd8n2smylRKXyyUsi8OW5VBOo9J0-JvRVnRJMlof62cF6xJaexSuqg2EKGgIs4wkZHFu6eg1g/s1600/executing+sql+statments.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5512277261664047714&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ-a-h5b_aPuEu3m9COr6IJi3CWxyOdcS7qiZQrbHkmQHwhmld-hMMczum1wHyajd8n2smylRKXyyUsi8OW5VBOo9J0-JvRVnRJMlof62cF6xJaexSuqg2EKGgIs4wkZHFu6eg1g/s400/executing+sql+statments.JPG&quot; style=&quot;cursor: pointer; float: left; height: 55px; margin: 0pt 10px 10px 0pt; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Executing Stored procedures&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4PCtYMm2OVTfpl9LNa9pqZAXMQX7wOeKLkbc4QtzzFKlIk6qzvcK6gV58qyTtZ50hIWCnTXHi9UCRHPS1WwWT5eWNUM-d_uYKGKL9es9S7Cl9wxajozGULzvNraoRo1U2OyvWZA/s1600/executing+sp.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5512277701677426978&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4PCtYMm2OVTfpl9LNa9pqZAXMQX7wOeKLkbc4QtzzFKlIk6qzvcK6gV58qyTtZ50hIWCnTXHi9UCRHPS1WwWT5eWNUM-d_uYKGKL9es9S7Cl9wxajozGULzvNraoRo1U2OyvWZA/s400/executing+sp.JPG&quot; style=&quot;cursor: pointer; float: left; height: 37px; margin: 0pt 10px 10px 0pt; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here you don&#39;t need to specify the parameter types or names. You just need to pass the parameters to the stored procedure. Only thing you need to make sure is you need to pass the parameters according to the order they are declared in you stored procedure.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Execute stored procedures with output parameters&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRQu-AdlhwG-4W5mYm5rXJuHlphMnofJuGZaPP2-Fx1KiLZ8j-Bw7tJvOFOo7asqqOCu-GqKxO6JlIvPFvwd-3UYzdcuReG9NduSWC5rHj4t8LMfR6BgmOZn8aTPgJ-5d1g8n5lw/s1600/with+out+param.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5512277946415199842&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRQu-AdlhwG-4W5mYm5rXJuHlphMnofJuGZaPP2-Fx1KiLZ8j-Bw7tJvOFOo7asqqOCu-GqKxO6JlIvPFvwd-3UYzdcuReG9NduSWC5rHj4t8LMfR6BgmOZn8aTPgJ-5d1g8n5lw/s400/with+out+param.JPG&quot; style=&quot;cursor: pointer; float: left; height: 141px; margin: 0pt 10px 10px 0pt; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Those are the classic methods to execute sql statements or stored procedures but with entlib version 5.0 I have noticed 2 new methods called &quot;ExecuteSprocAccessor&quot; and &quot;ExecuteSqlStringAccessor&quot; where you can return user defined element type record sets which make it more interesting to use entlib DAAB. Here I&#39;ll explain how to use these 2 methods.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 130%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Accessor Methods&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
First you need to define an entity with properties which needs to be mapped with your table fields.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeP8vgj92xUWQm6Ifw4sXGwOZQlr37Xbr7tNqouuSJDL6XWQwk7YrekJRHDKaU0jd0xrVerskneQ0xVTZ_FYV9f2fpkl9PaGDKxq4W5NbIJrs-7B6fS9BeWkto8kt2Q6e75l0WAg/s1600/class.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5512278225188004786&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeP8vgj92xUWQm6Ifw4sXGwOZQlr37Xbr7tNqouuSJDL6XWQwk7YrekJRHDKaU0jd0xrVerskneQ0xVTZ_FYV9f2fpkl9PaGDKxq4W5NbIJrs-7B6fS9BeWkto8kt2Q6e75l0WAg/s400/class.JPG&quot; style=&quot;cursor: pointer; float: left; height: 185px; margin: 0pt 10px 10px 0pt; width: 306px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Write a stored procedure to retrieve data&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA4K89emAjmTuyEMUhwKmHCetG-9LMA65AzPYhl7yRqEZV-CdzGRCswnLXEegfnHJxAoqI9xaUC3TRFPM4ACHGkX03igQ2yvQdwX3sXIO8XV7j6snF41vEBCedmBGFRfcoNgUrdQ/s1600/sp.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5512278492567934850&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA4K89emAjmTuyEMUhwKmHCetG-9LMA65AzPYhl7yRqEZV-CdzGRCswnLXEegfnHJxAoqI9xaUC3TRFPM4ACHGkX03igQ2yvQdwX3sXIO8XV7j6snF41vEBCedmBGFRfcoNgUrdQ/s400/sp.JPG&quot; style=&quot;cursor: pointer; float: left; height: 144px; margin: 0pt 10px 10px 0pt; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the &quot;ExecuteSprocAccessor&quot; method to retrieve a list of users.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6Bs9Qk5UfqNPSGN95PyXjR7XdKt2hZV0iGojr_mMuvJQKKqWxqy-parCDJTaOyzCDPEYB-JoUZTZnWZ2HEX3Kd4ff2KXiLBbh0edz6gxx9aeDljP_KYI018isSn5DurM7uyHbFg/s1600/sproc.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5512278791714841746&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6Bs9Qk5UfqNPSGN95PyXjR7XdKt2hZV0iGojr_mMuvJQKKqWxqy-parCDJTaOyzCDPEYB-JoUZTZnWZ2HEX3Kd4ff2KXiLBbh0edz6gxx9aeDljP_KYI018isSn5DurM7uyHbFg/s400/sproc.JPG&quot; style=&quot;cursor: pointer; float: left; height: 33px; margin: 0pt 10px 10px 0pt; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or use the ExecuteSqlStringAccessor method&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFMpRptgemY4aHMptLJNYqpesCX7mN15Pzb1ZUjQiCNTaLhTp7W3Zlsst-ByI37PhQ8vhBzsqttV7P74pcOiNhN5dbtAj1RHVf9-a6RH-60KU4uC-vas7eK6NNuh19896gr7S4LQ/s1600/sqlstring.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5512278965854106770&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFMpRptgemY4aHMptLJNYqpesCX7mN15Pzb1ZUjQiCNTaLhTp7W3Zlsst-ByI37PhQ8vhBzsqttV7P74pcOiNhN5dbtAj1RHVf9-a6RH-60KU4uC-vas7eK6NNuh19896gr7S4LQ/s400/sqlstring.JPG&quot; style=&quot;cursor: pointer; float: left; height: 42px; margin: 0pt 10px 10px 0pt; width: 400px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2010/09/using-microsoft-data-access-application.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWTlF2fjyDCUalES78vGtLe1PZXVg8Cz4nXwfI8Ik6_Qde1-vm1tkVEeKoHWHwjALtwHaZjk6b4KX4QSltyu7V7TTLvDnvsdKk9hp82V9tl_iyOK4SJuQqBUsUWW2LdW_4N04b-Q/s72-c/config.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-6176734109171894625</guid><pubDate>Mon, 07 Jun 2010 09:00:00 +0000</pubDate><atom:updated>2010-06-07T16:32:20.666+06:00</atom:updated><title>SQL Server 2008 Management Studio installation failed</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;I just wanted to install SQL Server 2008 Management Studio on my notebook. I couldn&#39;t complete the installation at once since one of the setup rules were started to fail over and over.&lt;/div&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbV0enMUcOBMeY0ITylWOv4M-Kk3dlxX3nSXw9tuZ2wQgsVVg9jPoBCqtsb2StcjbfMz3hSqi1DS3a3Ar7znvDg6_KjxlhN0tNBtq2Bq1lkTydjRbBlEcZv6m_LPAGSp6L6qXGig/s1600/nalaka.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbV0enMUcOBMeY0ITylWOv4M-Kk3dlxX3nSXw9tuZ2wQgsVVg9jPoBCqtsb2StcjbfMz3hSqi1DS3a3Ar7znvDg6_KjxlhN0tNBtq2Bq1lkTydjRbBlEcZv6m_LPAGSp6L6qXGig/s400/nalaka.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5479956572364510002&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I&#39;ve done this installation numerous times in the past but as I remember I never came across this kind of an issue. I couldn&#39;t continue the installation since one of the setup rules were started to fail. Simply the setup couldn&#39;t restart the computer. I restarted the machine couple of times but It didn&#39;t do any change. Then I realized(assumed) system needs a reboot but it couldn&#39;t complete the job it needs to be done in the reboot. So when I do a search regarding the operations need to be done in the reboot, I came across this registry key.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\PendingFileRenameOperations&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Clearing the values in this key resolved the problem for me.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Value of this entry holds the filenames until the system reboots and they&#39;ll be renamed. These entries are not created by the operating system.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is a cool link regarding this topic.&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.symantec.com/connect/articles/pending-file-rename-operations&quot;&gt;http://www.symantec.com/connect/articles/pending-file-rename-operations&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2010/06/sql-server-2008-management-studio.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbV0enMUcOBMeY0ITylWOv4M-Kk3dlxX3nSXw9tuZ2wQgsVVg9jPoBCqtsb2StcjbfMz3hSqi1DS3a3Ar7znvDg6_KjxlhN0tNBtq2Bq1lkTydjRbBlEcZv6m_LPAGSp6L6qXGig/s72-c/nalaka.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-1884744644463161849</guid><pubDate>Wed, 02 Jun 2010 08:30:00 +0000</pubDate><atom:updated>2010-06-02T15:15:38.044+06:00</atom:updated><title>Extending the .Net Menu Control</title><description>&lt;div align=&quot;justify&quot;&gt;This is a cool trick that you can use to extend existing script libraries that do not have the built in extensibility features.&lt;br /&gt;&lt;br /&gt;In one of the ASP.Net 2.0 projects I was using the ASP.Net menu control. ASP.Net menu control is a cool control with hell a lot of features and flexibility but I couldn&#39;t fulfill the need by using any of those.&lt;br /&gt;&lt;br /&gt;When you go(mouse over) to a menu item in the menu control, it highlights the menu item. But when you navigate to the next level(sub menu) of the menu, highlighted menu item in the previous level will lose the highlighted characteristic. So if you have a quite big or a menu which has couple of levels and if you are in the menu item which belongs to a latter level of the menu control, you might not know the path of the menu. Bottom line is path of the menu item should keep highlighted(hovered) so the user can see the path by the highlighted menu items. The task was challenging because I could not find a built in feature or an extensibility hook in the menu control itself.&lt;br /&gt;&lt;br /&gt;I was looking for the options to extend the control but menu control does not have client side object model or any support from DHTML side of the things which allows the extensibility. When I dig more into the problem I got to know that DHTML object model is just a big freaking hash table and interception will be a way to achieve flexibility/extensibility.&lt;br /&gt;&lt;br /&gt;So the basic idea behind the solution is in the javascript interpreter, everything from objects to functions is an entry in the globally defined dictionary. Because of this structure and the fact that javascript is loosely typed, you can substitute anything with anything else. So the inject point of the extensibility of the menu control will be the DHTML portion of the menu control. i will store some of the built in javascript functions in to variables and then set my own functions to those built-in functions. Then I will call the built in function from my own functions then do the rest I need. Actually I&#39;m overriding the built-in function. What a cool way to entend the control.&lt;br /&gt;&lt;br /&gt;Then comes the next problem. How do I know the functions I need to override? This is bit cumbersome in ASP.Net 2.0 because of the way it stores and sends stylesheet and javascript files to the browser. I had to open the page source and get the reference to a webResources.axd file. By copying and pasting this reference into the browser, I was able download the stylesheet or javascript file that&#39;s being referred.&lt;br /&gt;&lt;br /&gt;After downloading the relevant javascript file associated with the menu control, I see the 2 functions I want to intercept.&lt;br /&gt;Menu_HoverDynamic - This is the function that calls when you move the mouse over a menu item&lt;br /&gt;Menu_Unhover - This is the function that calls when you move the mouse off a menu item&lt;br /&gt;&lt;br /&gt;Algorithm is pretty simple to retain the &quot;hovered&quot; characteristic in the parent menu item. I used a built-in javascript function in menu control. In mouse over event it finds the item&#39;s parent menu item and fires the &quot;mouseover&quot; event of that parent menu item as well. Conversely, when the user moves the mouse off the menu items, it finds the parent menu item of it and fires the &quot;onmouseout&quot; event on that parent menu item. There is no need of any recrusive processing thanks to event bubbling mechanism provided by the DHTML DOM.&lt;br /&gt;&lt;br /&gt;The final code follows.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;1: &lt;&#39;script&#39; type&lt;span style=&quot;color:#339999;&quot;&gt;=&quot;text/javascript&quot;&lt;/span&gt; language&lt;span style=&quot;color:#336666;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#339999;&quot;&gt;&quot;javascript&quot;&lt;/span&gt;&gt;&lt;br /&gt;2:&lt;br /&gt;3: &lt;span style=&quot;color:#3333ff;&quot;&gt;var&lt;/span&gt; fw_Menu_Unhover;&lt;br /&gt;4: &lt;span style=&quot;color:#3333ff;&quot;&gt;var&lt;/span&gt; fw_Menu_HoverDynamic;&lt;br /&gt;5:&lt;br /&gt;6: &lt;span style=&quot;color:#3333ff;&quot;&gt;function&lt;/span&gt; SetupInterceptors(){ &lt;span style=&quot;color:#009900;&quot;&gt;// called by onload event&lt;/span&gt;&lt;br /&gt;7: fw_Menu_HoverDynamic = Menu_HoverDynamic;&lt;br /&gt;8: Menu_HoverDynamic = my_Menu_HoverDynamic;&lt;br /&gt;9: fw_Menu_Unhover = Menu_Unhover;&lt;br /&gt;10: Menu_Unhover = my_Menu_Unhover;&lt;br /&gt;11: }&lt;br /&gt;12:&lt;br /&gt;13: &lt;span style=&quot;color:#3333ff;&quot;&gt;function&lt;/span&gt; my_Menu_HoverDynamic(item) {&lt;br /&gt;14: fw_Menu_HoverDynamic(item);&lt;br /&gt;15: &lt;span style=&quot;color:#3333ff;&quot;&gt;var&lt;/span&gt; x = Menu_FindParentItem(item);&lt;br /&gt;16: &lt;span style=&quot;color:#3333ff;&quot;&gt;if&lt;/span&gt;(x &amp;amp;&amp;amp; x.tagName.toLowerCase() != &lt;span style=&quot;color:#339999;&quot;&gt;&quot;body&quot;&lt;/span&gt;)&lt;br /&gt;17: x.fireEvent(&lt;span style=&quot;color:#339999;&quot;&gt;&quot;onmouseover&quot;&lt;/span&gt;);&lt;br /&gt;18: }&lt;br /&gt;19:&lt;br /&gt;20: &lt;span style=&quot;color:#3333ff;&quot;&gt;function&lt;/span&gt; my_Menu_Unhover(item) {&lt;br /&gt;21: fw_Menu_Unhover(item);&lt;br /&gt;22: &lt;span style=&quot;color:#3333ff;&quot;&gt;var&lt;/span&gt; x = Menu_FindParentItem(item);&lt;br /&gt;23: &lt;span style=&quot;color:#3333ff;&quot;&gt;if&lt;/span&gt;(x &amp;amp;&amp;amp; x.tagName.toLowerCase() != &lt;span style=&quot;color:#339999;&quot;&gt;&quot;body&quot;&lt;/span&gt;)&lt;br /&gt;24: x.fireEvent&lt;span style=&quot;color:#339999;&quot;&gt;&lt;span style=&quot;color:#000000;&quot;&gt;(&lt;/span&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#339999;&quot;&gt;onmouseout&quot;&lt;/span&gt;);&lt;br /&gt;25: }&lt;br /&gt;26:&lt;br /&gt;27: &lt;&#39;/script&#39;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here it goes. My custom functions replace the menu control&#39;s built-in functions and provide the desired result.&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2010/06/extending-net-menu-control.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-3344900968678967150</guid><pubDate>Thu, 06 May 2010 10:10:00 +0000</pubDate><atom:updated>2010-05-06T17:09:37.150+06:00</atom:updated><title>nigella.com has selected to the 101 most useful websites</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixiknAy2y0NEw2R1D8pVuPF9MmPbWLaMxIV7ACSShmap3Nmit9JPI_GwB8TEJirqrpgiqxgnJ1tXWypJVfC3BFYsUwFwEMZ0bt81YuODOaE-uVTe_B6NL-Bywdtym0luXNKaSkQw/s1600/Capture.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 154px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixiknAy2y0NEw2R1D8pVuPF9MmPbWLaMxIV7ACSShmap3Nmit9JPI_GwB8TEJirqrpgiqxgnJ1tXWypJVfC3BFYsUwFwEMZ0bt81YuODOaE-uVTe_B6NL-Bywdtym0luXNKaSkQw/s400/Capture.JPG&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5468111959545604610&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnx10jDIyIxSq228wtQ2Xnb8osUUUDlwBRlcpcayqRCwvHbPKeUu3eKi_UuVTgeuI5g-8iRTg6YNVh2KeJ0cr-sRlfU-jIa9FYBrIkh8l7_vBdr-YmF7YKMrssLKME0JdDk4vbqg/s1600/Capture1.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 177px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnx10jDIyIxSq228wtQ2Xnb8osUUUDlwBRlcpcayqRCwvHbPKeUu3eKi_UuVTgeuI5g-8iRTg6YNVh2KeJ0cr-sRlfU-jIa9FYBrIkh8l7_vBdr-YmF7YKMrssLKME0JdDk4vbqg/s400/Capture1.JPG&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5468111793710952322&quot; /&gt;&lt;/a&gt;&lt;div&gt;nigella.com has selected to the 101 most usable web sites by daily telegraph. You can read the full story &lt;a href=&quot;http://www.telegraph.co.uk/technology/3356874/The-101-most-useful-websites.html&quot;&gt;http://www.telegraph.co.uk/technology/3356874/The-101-most-useful-websites.html&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2010/05/nigellacom-has-selected-to-101-most.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixiknAy2y0NEw2R1D8pVuPF9MmPbWLaMxIV7ACSShmap3Nmit9JPI_GwB8TEJirqrpgiqxgnJ1tXWypJVfC3BFYsUwFwEMZ0bt81YuODOaE-uVTe_B6NL-Bywdtym0luXNKaSkQw/s72-c/Capture.JPG" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-1055858673056580293</guid><pubDate>Tue, 23 Mar 2010 08:34:00 +0000</pubDate><atom:updated>2010-03-23T14:59:46.254+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>Passing a string of IDs to a WHERE IN clause</title><description>&lt;div align=&quot;justify&quot;&gt;Scenario: There is a stored procedure that accepts a comma separated string of Ids as ‘1589, 1586, 1587’.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Stored procedure:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;CREATE PROCEDURE&lt;/span&gt; [dbo].[Employee_GetByIds]&lt;br /&gt;@IDs &lt;span style=&quot;color:#333399;&quot;&gt;VARCHAR&lt;/span&gt;(1000)&lt;br /&gt;&lt;span style=&quot;color:#000099;&quot;&gt;&lt;span style=&quot;color:#333399;&quot;&gt;AS&lt;br /&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#009900;&quot;&gt;-- SET NOCOUNT ON added to prevent extra result sets from&lt;br /&gt;-- interfering with SELECT statements.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#333399;&quot;&gt;SET NOCOUNT ON&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;SELECT&lt;/span&gt; Id,FirstName, LastName, Address, Phone &lt;span style=&quot;color:#333399;&quot;&gt;FROM&lt;/span&gt; Employee &lt;span style=&quot;color:#333399;&quot;&gt;WHERE&lt;/span&gt; Id &lt;span style=&quot;color:#666666;&quot;&gt;IN&lt;/span&gt; (@IDs)&lt;br /&gt;&lt;span style=&quot;color:#000099;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Issue: application threw an error since the Id field of the Employee table is in the type of int but the parameter (@IDs) is with the type of varchar. From our application where pass the string of ID list will be something like ‘1585,1586,1587’. So we have to hold this value in a string type variable and pass the value to the stored procedure. Stored procedure accepts the value as a varchar type parameter but it uses it in a int type field. That’s where the problem arises.&lt;br /&gt;&lt;br /&gt;Solution: Use a table-valued function to insert the list of IDs to a table and use the function within the stored procedure to select the list of IDs from that table instead of comparing the raw ID list.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Splitter function that inserts the list of IDs to a table:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;ALTER FUNCTION&lt;/span&gt; [dbo].[Splitter] (@IDs &lt;span style=&quot;color:#333399;&quot;&gt;VARCHAR&lt;/span&gt;(100) )&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;RETURNS&lt;/span&gt; @Tbl_IDs &lt;span style=&quot;color:#333399;&quot;&gt;TABLE&lt;/span&gt;(ID &lt;span style=&quot;color:#333399;&quot;&gt;INT&lt;/span&gt;) &lt;span style=&quot;color:#333399;&quot;&gt;AS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#009900;&quot;&gt;-- Append comma&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;SET&lt;/span&gt; @IDs = @IDs + &lt;span style=&quot;color:#990000;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#009900;&quot;&gt;-- Indexes to keep the position of searching&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;DECLARE&lt;/span&gt; @Pos1 &lt;span style=&quot;color:#333399;&quot;&gt;INT&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;DECLARE&lt;/span&gt; @pos2 &lt;span style=&quot;color:#333399;&quot;&gt;INT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#009900;&quot;&gt;-- Start from first character&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;SET&lt;/span&gt; @Pos1=1&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;SET&lt;/span&gt; @Pos2=1&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;WHILE&lt;/span&gt; @Pos1&lt;len(@ids)&gt; &lt; &lt;span style=&quot;color:#cc33cc;&quot;&gt;LEN&lt;/span&gt;(@IDs)&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;SET&lt;/span&gt; @Pos1 = &lt;span style=&quot;color:#cc33cc;&quot;&gt;CHARINDEX&lt;/span&gt;(&lt;span style=&quot;color:#cc0000;&quot;&gt;&#39;,&#39;&lt;/span&gt;,@IDs,@Pos1)&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;INSERT&lt;/span&gt; @Tbl_IDs &lt;span style=&quot;color:#333399;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color:#cc33cc;&quot;&gt;CASE&lt;/span&gt;(&lt;span style=&quot;color:#cc33cc;&quot;&gt;SUBSTRING&lt;/span&gt;(@IDs,@Pos2,@Pos1-@Pos2) &lt;span style=&quot;color:#333399;&quot;&gt;AS INT&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color:#009900;&quot;&gt;-- Go to next non comma character&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;SET&lt;/span&gt; @Pos2=@Pos1+1&lt;br /&gt;&lt;span style=&quot;color:#009900;&quot;&gt;-- Search from the next charcater&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;SET&lt;/span&gt; @Pos1 = @Pos1+1&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;END&lt;br /&gt;RETURN&lt;br /&gt;END&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Stored procedure has been altered to use the list of IDs converted to a table value by the splitter function:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;ALTER PROCEDURE&lt;/span&gt; [dbo].[SourceDocument_GetByIDs]&lt;br /&gt;@IDs &lt;span style=&quot;color:#333399;&quot;&gt;VARCHAR&lt;/span&gt;(1000)&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;AS&lt;br /&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#009900;&quot;&gt;-- SET NOCOUNT ON added to prevent extra result sets from&lt;br /&gt;-- interfering with SELECT statements.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color:#333399;&quot;&gt;SET NOCOUNT ON&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;Id,FirstName, LastName, Address, Phone &lt;span style=&quot;color:#333399;&quot;&gt;FROM&lt;/span&gt; Employee &lt;span style=&quot;color:#333399;&quot;&gt;WHERE&lt;/span&gt; Id &lt;span style=&quot;color:#666666;&quot;&gt;IN&lt;/span&gt; (&lt;span style=&quot;color:#333399;&quot;&gt;SELECT&lt;/span&gt; ID &lt;span style=&quot;color:#333399;&quot;&gt;FROM&lt;/span&gt; Splitter(@IDs))&lt;br /&gt;&lt;span style=&quot;color:#333399;&quot;&gt;END&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2010/03/passing-string-of-ids-to-where-in.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-1412320127813016569</guid><pubDate>Sun, 21 Mar 2010 09:23:00 +0000</pubDate><atom:updated>2010-03-21T16:45:34.654+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.Net</category><category domain="http://www.blogger.com/atom/ns#">CLR</category><category domain="http://www.blogger.com/atom/ns#">Development</category><title>Application Domain</title><description>&lt;div align=&quot;justify&quot;&gt;One of the badly behaved DLLs/components of your application can bring your whole application or everything else down. One of the things we can do to resolve this issue is isolate the DLL/component from everything else. What does this isolation means? In pre-.Net days this only means isolating the code through processes.&lt;br /&gt;&lt;br /&gt;If you don’t put an extra effort to isolate the components in your application, when you run the application, your whole application will run within a context of a single process. Since windows isolates process from each other through memory address, it’ll share the same memory space. All the components in the application have access to this common memory space shared though out the application. Because of this, a badly behaved piece of code can bring the whole application down.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7TQHtxN7EOCh2dJ-bRqF33SCfwdkzLCYd2t4YcH8fr5V02yFxQE1T9WLop6VDaCktUBNLqKtpFk2nEgqtvqEzRtctLbMCk_jpTj2I6pBhoap7gV7mOrwHEFmGnXVUMIAlHKjPw/s1600-h/1.jpg&quot;&gt;&lt;img style=&quot;TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 287px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5451027767597305570&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7TQHtxN7EOCh2dJ-bRqF33SCfwdkzLCYd2t4YcH8fr5V02yFxQE1T9WLop6VDaCktUBNLqKtpFk2nEgqtvqEzRtctLbMCk_jpTj2I6pBhoap7gV7mOrwHEFmGnXVUMIAlHKjPw/s400/1.jpg&quot; /&gt; &lt;p align=&quot;justify&quot;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;How can you isolate processes? In pre.Net days COM is one of the technologies that enabled you to isolate processes by allowing a process to call a COM component which is an executable. But the main disadvantage of this method is since the processes can’t share memory or use the same address space, a complex marshalling process has to be used to copy data between the processes. Tough processes are great by considering security, the disadvantage is the performance. Because often number of processes will normally working together and you have to develop data marshalling processes to ensure the communication between those.&lt;br /&gt;&lt;br /&gt;So the two main problems need to be addressed were the isolation of the processes and to ensure the marshalling process between processes to copy data between them.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj5R1WaSHQupDjdGfGJVXCq_4e8KwC6_-Ny1VgBpjd3AAeZqeBUjrt961-w9p9EnDFj6vuEXEpjZQ4vqpTu3NJemgcHr96xxvHhUg4-LDSEpiAIWpWF69-WDZ1oBnA3tOTcqN03w/s1600-h/2.jpg&quot;&gt;&lt;img style=&quot;TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 287px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5451028453912144610&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj5R1WaSHQupDjdGfGJVXCq_4e8KwC6_-Ny1VgBpjd3AAeZqeBUjrt961-w9p9EnDFj6vuEXEpjZQ4vqpTu3NJemgcHr96xxvHhUg4-LDSEpiAIWpWF69-WDZ1oBnA3tOTcqN03w/s400/2.jpg&quot; /&gt; &lt;p align=&quot;justify&quot;&gt;&lt;/a&gt;&lt;br /&gt;In .Net, application domains are designed in a way that separating the processes without resulting performance problems with passing data between them. The whole idea behind applications domains are a process can be divided in to several application domains(containers). Most probably application domain corresponds to single application. Even though there are different executables, if they are running in the context of the same process, theoretically they can directly see each other’s data and it should share the same address space. But CLR makes sure that it does not happen. .Net Remoting is one of the areas application domains come in to action.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2010/03/application-domain.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7TQHtxN7EOCh2dJ-bRqF33SCfwdkzLCYd2t4YcH8fr5V02yFxQE1T9WLop6VDaCktUBNLqKtpFk2nEgqtvqEzRtctLbMCk_jpTj2I6pBhoap7gV7mOrwHEFmGnXVUMIAlHKjPw/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-3412842848444444348</guid><pubDate>Tue, 09 Mar 2010 04:44:00 +0000</pubDate><atom:updated>2010-03-09T12:07:36.383+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Cricket</category><title>81st Battle of the maroons created the history in sri lankan sports</title><description>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbBf-9Nn5s68mmIbDiv_YDoPP6mdPOrL0-4Dyn95ezMjk9ybMKf0XgupkCY-pQTS3DxX9AAbDjd_p_XUh01DUz1zNvO2Er3TRLiXsv3DkGc8QAlUiYsS9e2m_Nkjz1Bh7W5j4K_A/s1600-h/IMAGE_222.jpg&quot;&gt;&lt;img style=&quot;MARGIN: 0px 0px 10px 10px; WIDTH: 200px; FLOAT: right; HEIGHT: 150px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5446501812808209746&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbBf-9Nn5s68mmIbDiv_YDoPP6mdPOrL0-4Dyn95ezMjk9ybMKf0XgupkCY-pQTS3DxX9AAbDjd_p_XUh01DUz1zNvO2Er3TRLiXsv3DkGc8QAlUiYsS9e2m_Nkjz1Bh7W5j4K_A/s200/IMAGE_222.jpg&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-KSfKbNDj1zbTqFm7sibNp3t-CzpdmxLsLj15rpPfdRPqnXCs8BccZYCmMTT0laYLViY0obs2ATVL3b_12Q1ncePLmxq50c4d_PUOL04To7r8vI_q6EhaLyu6zqa70rlHjd0dkQ/s1600-h/IMAGE_214.jpg&quot;&gt;&lt;img style=&quot;MARGIN: 0px 0px 10px 10px; WIDTH: 200px; FLOAT: right; HEIGHT: 150px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5446501665700917186&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-KSfKbNDj1zbTqFm7sibNp3t-CzpdmxLsLj15rpPfdRPqnXCs8BccZYCmMTT0laYLViY0obs2ATVL3b_12Q1ncePLmxq50c4d_PUOL04To7r8vI_q6EhaLyu6zqa70rlHjd0dkQ/s200/IMAGE_214.jpg&quot; /&gt;&lt;/a&gt; 81st Battle of maroons made another memorable moment in sri lankan sports history by introducing a RF ID for the first time in a sporting event. Spectators were given a RF ID instead of conventional tear off tickets. The gates were equipped with the readers and the movements of the spectators will be monitored as the move in and out though the gates. This will streamline the ticketing process in future. Credit should go to the Battle of Maroons joint committee IT team for designing and implementing the system.&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2010/03/81st-battle-of-maroons-made-another.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbBf-9Nn5s68mmIbDiv_YDoPP6mdPOrL0-4Dyn95ezMjk9ybMKf0XgupkCY-pQTS3DxX9AAbDjd_p_XUh01DUz1zNvO2Er3TRLiXsv3DkGc8QAlUiYsS9e2m_Nkjz1Bh7W5j4K_A/s72-c/IMAGE_222.jpg" height="72" width="72"/><thr:total>19</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-3035952688069359500</guid><pubDate>Wed, 03 Feb 2010 11:28:00 +0000</pubDate><atom:updated>2010-02-04T18:15:32.334+06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>SQL Server structure change scripts</title><description>I&#39;ve been doing re-engineering work of a project for the past couple of months. It&#39;s bit difficult to do re-engineering work rather than doing sometihng from the scratch because you&#39;ll have a hell of lot of limitations while doing re-engineering work.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These re-engineering work included some database changes like adding relationshipes among tables, changing datatypes, lengths of existing columns. Since the project is in the production enviornment I wanted to do these changes without effecting or dropping existing data in the database. I&#39;ve used couple of tools.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When you are doing changed to the database objects. As an example when you are changing the datatype of an existing column you can generate the alter script for that change. it will create the alter script without effecting your data.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;trebuchet ms&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:small;&quot;&gt;Step 1 : Changing the datatype of the column RegisteredDate from datetime to smalldatetime&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;trebuchet ms&#39;;&quot;&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf8TNLrlg1HdQTGay1XnqYhtOz6U1UhkMKlH6xrrroKroA_6w4pnCZ6KTPmQw8-Z0DKsSSAH-jvbH4UeCU5pTf9GvNWOdoMAny-UMivMsNmm93A11kez8Fz0FTYBmKQq93LNsOxA/s1600-h/1.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf8TNLrlg1HdQTGay1XnqYhtOz6U1UhkMKlH6xrrroKroA_6w4pnCZ6KTPmQw8-Z0DKsSSAH-jvbH4UeCU5pTf9GvNWOdoMAny-UMivMsNmm93A11kez8Fz0FTYBmKQq93LNsOxA/s320/1.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5433980789282178898&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;trebuchet ms&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;trebuchet ms&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:small;&quot;&gt;Step 2 : Before saving the table design, right clink on a column and click on Generate Change Script...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhngZ0_OMAgog2-xkYj9-tl2a5IadlUFQWxpLgVA0jMfVPI7AFZ_8tzbgJ9r9f-MQ01jFCd6zAbulaD49Crsuvz-6FCdGATu-q2yLXdlvQAetjZiUiQjZg0BO7W-z1MzJuLDYkQiQ/s1600-h/2.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 318px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhngZ0_OMAgog2-xkYj9-tl2a5IadlUFQWxpLgVA0jMfVPI7AFZ_8tzbgJ9r9f-MQ01jFCd6zAbulaD49Crsuvz-6FCdGATu-q2yLXdlvQAetjZiUiQjZg0BO7W-z1MzJuLDYkQiQ/s320/2.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5433981333603239394&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;trebuchet ms&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;trebuchet ms&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:small;&quot;&gt;Step 3 : You&#39;ll see the change script on a popup window&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-66in_dUjblrbkQ5oESrsDy8pWhXUqYr5qj4W9Kz7bBuAaur1yjo25aJCTzrSd1xz-OG7FY7gfyLlmzIwji0KvIhsaQskAtLu8gKJgjUl35Ll3goOPURURekglzuH4de-tvulzw/s1600-h/3.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 254px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-66in_dUjblrbkQ5oESrsDy8pWhXUqYr5qj4W9Kz7bBuAaur1yjo25aJCTzrSd1xz-OG7FY7gfyLlmzIwji0KvIhsaQskAtLu8gKJgjUl35Ll3goOPURURekglzuH4de-tvulzw/s320/3.JPG&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5433981799137943938&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Analyze the genereted script&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:small;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;BEGIN TRANSACTION&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;SET QUOTED_IDENTIFIER ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;SET ARITHABORT ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;SET NUMERIC_ROUNDABORT OFF&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;SET CONCAT_NULL_YIELDS_NULL ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;SET ANSI_NULLS ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;SET ANSI_PADDING ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;SET ANSI_WARNINGS ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;COMMIT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;BEGIN TRANSACTION&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;CREATE TABLE dbo.Tmp_Customer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;Id int NOT NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;FirstName varchar(50) NOT NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;LastName varchar(50) NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;WorkPhone varchar(50) NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;MobilePhone varchar(50) NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;RegisteredDate smalldatetime NOT NULL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;)  ON [PRIMARY]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;IF EXISTS(SELECT * FROM dbo.Customer)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; EXEC(&#39;INSERT INTO dbo.Tmp_Customer (Id, FirstName, LastName, WorkPhone, MobilePhone, RegisteredDate)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;SELECT Id, FirstName, LastName, WorkPhone, MobilePhone, CONVERT(smalldatetime, RegisteredDate) FROM dbo.Customer WITH (HOLDLOCK TABLOCKX)&#39;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;DROP TABLE dbo.Customer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;EXECUTE sp_rename N&#39;dbo.Tmp_Customer&#39;, N&#39;Customer&#39;, &#39;OBJECT&#39; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;ALTER TABLE dbo.Customer ADD CONSTRAINT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;PK_Customer PRIMARY KEY CLUSTERED &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;Id&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-small;&quot;&gt;COMMIT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;If you analyse the generated script, there are 4 major operations.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. create a temporary table with the new column definitions. &lt;/div&gt;&lt;div&gt;2. Inserts data to the temporary table from the existing table.&lt;/div&gt;&lt;div&gt;3. Drop the existing table&lt;/div&gt;&lt;div&gt;4. Rename the new/temporary table to the name of the existing table.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So you won&#39;t lose any data.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is a feature provided by SQL Server but you can &lt;a href=&quot;http://www.google.co.in/search?rlz=1C1CHMB_enIN355IN355&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=Sql+Server+database+publishing+wizard&quot;&gt;download&lt;/a&gt; this database publishing tool as a separate software.&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2010/02/sql-server-structure-change-scripts.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf8TNLrlg1HdQTGay1XnqYhtOz6U1UhkMKlH6xrrroKroA_6w4pnCZ6KTPmQw8-Z0DKsSSAH-jvbH4UeCU5pTf9GvNWOdoMAny-UMivMsNmm93A11kez8Fz0FTYBmKQq93LNsOxA/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-2889480294091948160</guid><pubDate>Mon, 15 Sep 2008 09:52:00 +0000</pubDate><atom:updated>2008-09-15T16:20:03.652+06:00</atom:updated><title>What is LINQ?</title><description>&lt;span style=&quot;font-size:85%;&quot;&gt;One of the few things I had to use more frequently in last few days is LINQ. Although LINQ is not a new topic I had to use it more frequently so I thought to write something about LINQ including my experiences in it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;It&#39;s not been so long since Microsoft has included typed-dataset in Visual Studio 2005 as their latest information access method. It seems that the next big challenge in programming is to reduce the complexity and time of information access. If you want to develop a database application using .net simplest approach was to use ADO.Net. ADO.Net works as the middle ware of your application. It provides a complete object oriented wrapper around the database. To develop a database application using ADO.Net you have to have a good knowledge in SQL as well as programming concepts. Visual Studio 2008 comes with the general purpose query facilities to .net framework which is applicable to various information sources not just relational data which is called Language-Integrated Query (LINQ).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;LINQ provides a set of general purpose standard query operators to traverse, filter, order, etc... to facilitate those operations. It helps any .Net based programming language. These standard query operators are applicable to any kind of information source which implements the IEnumerable&lt;t&gt; interface.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;strong&gt;LINQ query/operators&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;string[]&lt;/span&gt; names = { &lt;span style=&quot;color:#990000;&quot;&gt;&quot;Ajantha&quot;&lt;span style=&quot;color:#000000;&quot;&gt;,&lt;/span&gt; &quot;Gayan&quot;&lt;span style=&quot;color:#000000;&quot;&gt;,&lt;/span&gt; &quot;Jennifer&quot;&lt;span style=&quot;color:#000000;&quot;&gt;,&lt;/span&gt; &quot;Leo&quot;&lt;/span&gt;&lt;span style=&quot;color:#000000;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#990000;&quot;&gt;&quot;Nalaka&quot;&lt;span style=&quot;color:#000000;&quot;&gt;,&lt;/span&gt; &quot;Rasika&quot;&lt;span style=&quot;color:#000000;&quot;&gt;,&lt;/span&gt; &quot;Rajitha&quot;&lt;span style=&quot;color:#000000;&quot;&gt;,&lt;/span&gt; &quot;Randy&quot;&lt;/span&gt; };&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#339999;&quot;&gt;IEnumerable&lt;/span&gt;&lt;&lt;span style=&quot;color:#3333ff;&quot;&gt;string&lt;/span&gt;&gt; query = &lt;span style=&quot;color:#3333ff;&quot;&gt;from&lt;/span&gt; q &lt;span style=&quot;color:#3333ff;&quot;&gt;in&lt;/span&gt; names&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;where&lt;/span&gt; q.Length == 6&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;orderby&lt;/span&gt; q&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;select&lt;/span&gt; q.ToUpper(); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color:#3333ff;&quot;&gt;string&lt;/span&gt; name &lt;span style=&quot;color:#3333ff;&quot;&gt;in&lt;/span&gt; query) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;Response.Write(name + &lt;span style=&quot;color:#990000;&quot;&gt;&quot;  &quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;if you compile and run this code you&#39;ll see the output,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;NALAKA &lt;/span&gt; &lt;span style=&quot;font-size:85%;&quot;&gt;RASIKA&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;There are 3 standard query operators used in this query expression. where, orderby, select. This query expression can be re-written as,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#339999;&quot;&gt;IEnumerable&lt;/span&gt;&lt;&lt;span style=&quot;color:#3333ff;&quot;&gt;string&lt;/span&gt;&gt; query = names&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;.Where(s =&gt; s.Length == 6)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;.OrderBy(s =&gt; s) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;.Select(s =&gt; s.ToUpper());&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;This type of a query is called a method based query. Arguments passed to Where, OrderBy, Select operators are called lambda expressions which are piece of codes or much like delegates. It allows to write individual query operators and bind together with the dot(.).&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2008/09/what-is-linq_15.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-6297581324565897319</guid><pubDate>Fri, 30 May 2008 06:41:00 +0000</pubDate><atom:updated>2008-05-30T13:17:33.090+06:00</atom:updated><title>DataTable.Rows.InsertAt(DataRow, Position)</title><description>&lt;p&gt;&lt;span style=&quot;font-family:trebuchet ms;font-size:85%;&quot;&gt;I wanted to interchange row positions of some records in my data table. Actually I wanted to search some records and bring those records on top of the data table. So I wrote this piece of code.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#339999;&quot;&gt;DataRow[]&lt;/span&gt; foundRows = dt.Select(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;firstName+&#39; &#39;+lastName=&#39;&quot;&lt;/span&gt; + SearchString + &lt;span style=&quot;color:#990000;&quot;&gt;&quot;&#39;&quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color:#3333ff;&quot;&gt;int&lt;/span&gt; i = 0; i &lt;&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;{   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;   dt.Rows.Remove(foundRows[i]);   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;   dt.Rows.InsertAt(foundRows[i],i);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;I didn&#39;t see any wrong with this code so I debugged to test the code. what I was expected to get the selected records on top of the data table as first few rows but the output was not what I was expected. replaces first few columns showed as blank records. When inserting records through InsertAt method it has inserted blank columns. so I checked the data row (foundRows[i]) just before inserting to the data table through InsertAt method and it showed the values of the record properly.&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;font-size:85%;&quot;&gt;Finally my conclusion was after Inserted the new record to the data table through InsertAt method, those records become blank records. So I changed the above code as,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#339999;&quot;&gt;DataRow[]&lt;/span&gt; foundRows = dt.Select(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;firstName+&#39; &#39;+lastName=&#39;&quot;&lt;/span&gt; + SearchString + &lt;span style=&quot;color:#990000;&quot;&gt;&quot;&#39;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color:#3333ff;&quot;&gt;int&lt;/span&gt; i = 0; i &lt; foundRows.Length; i++)&lt;br /&gt;{&lt;br /&gt;   &lt;span style=&quot;color:#339999;&quot;&gt;DataRow&lt;/span&gt; dr = dt.NewRow();&lt;br /&gt;   dr[&lt;span style=&quot;color:#990000;&quot;&gt;&quot;id&quot;&lt;/span&gt;] = foundRows[i][&lt;span style=&quot;color:#990000;&quot;&gt;&quot;id&quot;&lt;/span&gt;];&lt;br /&gt;   dr[&lt;span style=&quot;color:#990000;&quot;&gt;&quot;FirstName&quot;&lt;/span&gt;] = foundRows[i][&lt;span style=&quot;color:#990000;&quot;&gt;&quot;FirstName&quot;&lt;/span&gt;];&lt;br /&gt;   dr[&lt;span style=&quot;color:#990000;&quot;&gt;&quot;LastName&quot;&lt;/span&gt;] = foundRows[i][&lt;span style=&quot;color:#990000;&quot;&gt;&quot;LastName&quot;&lt;/span&gt;];&lt;br /&gt;   dr[&lt;span style=&quot;color:#990000;&quot;&gt;&quot;Title&quot;&lt;/span&gt;] = foundRows[i][&lt;span style=&quot;color:#990000;&quot;&gt;&quot;Title&quot;&lt;/span&gt;];&lt;br /&gt;   dr[&lt;span style=&quot;color:#990000;&quot;&gt;&quot;Location&quot;&lt;/span&gt;] = foundRows[i][&lt;span style=&quot;color:#990000;&quot;&gt;&quot;Location&quot;&lt;/span&gt;];&lt;br /&gt;   dt.Rows.Remove(foundRows[i]);&lt;br /&gt;   dt.Rows.InsertAt(dr,i);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:times new roman;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;font-size:85%;&quot;&gt;And it worked perfectly. I had to create a new data row, assign the selected data row to that and insert newly created data row to the data table.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2008/05/datatablerowsinsertatdatarow-position.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-683596503436681853</guid><pubDate>Wed, 28 May 2008 05:05:00 +0000</pubDate><atom:updated>2008-05-28T11:08:46.743+06:00</atom:updated><title>Fuel hike</title><description>&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span&gt;Diesel prices increased from Rs.80 to Rs.130. It&#39;s a 62.5 percent increase from the current prices. This increase of diesel prices will affect many industries in sri lanka. Bus fair increased immediately from 27.2 percent and it might rise again in next couple of days. This will be the most touching increase of fuel hike to sri lankan citizens in the recent history.&lt;br /&gt;&lt;br /&gt;Recent hike in food and fuel prices is not limited to sri lanka. Countries in war zones like Somalia, Afghanistan and Haiti are already suffering from this problem. Now it will start to feel to sri lankan citizens also with this fuel hike.&lt;br /&gt;&lt;br /&gt;Most of the economists say that this will be a year of very high expenditure. I hope the sri lankan government will take necessary actions to help sri lankan citizens to balance their weight of expenditure.&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2008/05/fuel-hike.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-1419625213144152802</guid><pubDate>Fri, 04 Apr 2008 11:36:00 +0000</pubDate><atom:updated>2008-04-04T17:38:53.645+06:00</atom:updated><title>undefined</title><description>&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;if&lt;/span&gt; (obj ==&lt;span style=&quot;color:#3333ff;&quot;&gt; null&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;What do we expect to check by using the above condition in javascript?&lt;br /&gt;&lt;br /&gt;javascript never sets a value to null. So we can check only whether we have assigned null programmatically by using the above condition. In most of the programming languages if we want to check whether a values has been assigned to a variable or not we can use the above condition(C# as an example) but not in javascript. When a value is not assigned to a variable in javascript, it assigns the default value of &#39;undefined&#39;. So check undefined.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color:#3333ff;&quot;&gt;typeof&lt;/span&gt; obj ==&lt;span style=&quot;color:#993300;&quot;&gt; &#39;undefined&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2008/04/undefined.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-274094616791552925</guid><pubDate>Tue, 01 Apr 2008 11:22:00 +0000</pubDate><atom:updated>2008-04-01T19:30:40.676+06:00</atom:updated><title>?? Operator</title><description>&lt;span style=&quot;font-size:85%;&quot;&gt;I have been addicted to use ? operator in C# for sometime. If I want to check a condition and do something according to the true/false status of that condition we used this method in old days.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt; (Request.QueryString[&lt;/span&gt;&lt;span style=&quot;color:#993300;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&quot;param1&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;] != &lt;/span&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;null&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;br /&gt;  param1 = Request.QueryString[&lt;span style=&quot;color:#993300;&quot;&gt;&quot;param1&quot;&lt;/span&gt;];&lt;br /&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;else&lt;/span&gt;&lt;br /&gt;  param1 = &lt;/span&gt;&lt;span style=&quot;color:#993300;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After the introduction of the &quot;?&quot; operator I used to write the same piece of code as,&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;string&lt;/span&gt; param1 = Request.QueryString[&lt;/span&gt;&lt;span style=&quot;color:#993300;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&quot;param1&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;] != &lt;/span&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;null&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt; ? Request.QueryString[&lt;span style=&quot;color:#993300;&quot;&gt;&quot;param1&quot;&lt;/span&gt;].ToString() : &lt;span style=&quot;color:#993300;&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;C# has introduced another operator which is &quot;??&quot;. It is used to replace null. So I&#39;ll kept in mind that to force myself to use &quot;??&quot; operator where I can use it as,&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;string&lt;/span&gt; param1 = Request.QueryString[&lt;span style=&quot;color:#993300;&quot;&gt;&quot;param1&quot;&lt;/span&gt;] ?? &lt;/span&gt;&lt;span style=&quot;color:#993300;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:0;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:0;&quot;&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2008/04/operator.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-1855683494625040475</guid><pubDate>Sun, 16 Dec 2007 06:34:00 +0000</pubDate><atom:updated>2007-12-26T13:18:16.929+06:00</atom:updated><title>Sony Cybershot DSC H7</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaO0DniL3nhCLGvjdrWPeWWoQ-rTOxJquXJyQCWKJzUvGmFfXuy6dhVViXtXf7Hrgp2w1RX4io4dTTOv8MKLFsyHdXpZCO3IuAPhq2mxBJupGjKJpZWWqB7KiyykcJZIjum1LNBw/s1600-h/camera.JPG&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaO0DniL3nhCLGvjdrWPeWWoQ-rTOxJquXJyQCWKJzUvGmFfXuy6dhVViXtXf7Hrgp2w1RX4io4dTTOv8MKLFsyHdXpZCO3IuAPhq2mxBJupGjKJpZWWqB7KiyykcJZIjum1LNBw/s200/camera.JPG&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5148170995132665858&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Finally I decided to settle with Sony Cybershot DSC H7. It&#39;s a cool SLR Like camera with some cool &amp;amp; smart features that I was looking for. DSC H7 comes with Carl Zeiss Vario-Tessar Lens with 15x Optical Zoom, 30x digital zoom, 8.1 Mega Pixels, 2.5&quot; LCD Screen, W: Approx. 50cm to Infinity, T: Approx. 120cm to Infinity auto focus range and many more &lt;a href=&quot;http://www.sony-asia.com/product/dsc-h7/sku/dsc-h7%252Fb%2B%2B%2B%2Be32?site=hp_en_AP_i&quot;&gt;features&lt;/a&gt;. It cost  US$ 409 and it really worth for the price. So I&#39;m looking forward to capture some scenes (specially natural and wild life) with this new smart piece. &lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/12/sony-cybershot-dsc-h7.html</link><author>noreply@blogger.com (Nalaka)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaO0DniL3nhCLGvjdrWPeWWoQ-rTOxJquXJyQCWKJzUvGmFfXuy6dhVViXtXf7Hrgp2w1RX4io4dTTOv8MKLFsyHdXpZCO3IuAPhq2mxBJupGjKJpZWWqB7KiyykcJZIjum1LNBw/s72-c/camera.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-4749986489637484851</guid><pubDate>Wed, 17 Oct 2007 08:33:00 +0000</pubDate><atom:updated>2007-10-17T14:55:31.589+06:00</atom:updated><title>Writing data into XML files</title><description>&lt;span style=&quot;font-size:85%;&quot;&gt;You can use XmlTextWriter to write XML. XmlTextwriter is an implementation of the XmlWriter class. This class provides number of validatins to make sure xml is well formed. Here is the code to create a XML file.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;using&lt;/span&gt; System.Xml;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;span style=&quot;color:#339999;&quot;&gt;XmlTextWriter&lt;/span&gt; myXmlTextWriter = &lt;span style=&quot;color:#3333ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color:#339999;&quot;&gt;XmlTextWriter&lt;/span&gt;(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;student.xml&quot;&lt;/span&gt;, &lt;span style=&quot;color:#3333ff;&quot;&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.Formatting = &lt;span style=&quot;color:#339999;&quot;&gt;Formatting&lt;/span&gt;.Indented;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteStartDocument(&lt;span style=&quot;color:#3333ff;&quot;&gt;false&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteDocType(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;students&quot;&lt;/span&gt;, &lt;span style=&quot;color:#3333ff;&quot;&gt;null&lt;/span&gt;, &lt;span style=&quot;color:#990000;&quot;&gt;&quot;students.dtd&quot;&lt;/span&gt;, &lt;span style=&quot;color:#3333ff;&quot;&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteComment(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;This file represents a student in the institute&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteStartElement(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;students&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteStartElement(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;student&quot;&lt;/span&gt;, &lt;span style=&quot;color:#3333ff;&quot;&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteAttributeString(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;id&quot;&lt;/span&gt;,&lt;span style=&quot;color:#990000;&quot;&gt;&quot;BCS00094&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteAttributeString(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;category&quot;&lt;/span&gt;, &lt;span style=&quot;color:#990000;&quot;&gt;&quot;Bsc&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteAttributeString(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;course&quot;&lt;/span&gt;, &lt;span style=&quot;color:#990000;&quot;&gt;&quot;Computer Science&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteElementString(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;birthdate&quot;&lt;/span&gt;, &lt;span style=&quot;color:#3333ff;&quot;&gt;null&lt;/span&gt;, &lt;span style=&quot;color:#990000;&quot;&gt;&quot;1979-05-22&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteStartElement(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;Name&quot;&lt;/span&gt;, &lt;span style=&quot;color:#3333ff;&quot;&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteElementString(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;first-name&quot;&lt;/span&gt;, &lt;span style=&quot;color:#990000;&quot;&gt;&quot;Shawn&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteElementString(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;last-name&quot;&lt;/span&gt;, &lt;span style=&quot;color:#990000;&quot;&gt;&quot;Tait&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteEndElement();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteElementString(&lt;span style=&quot;color:#990000;&quot;&gt;&quot;GPA&quot;&lt;/span&gt;, &lt;span style=&quot;color:#990000;&quot;&gt;&quot;4.55&quot;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteEndElement();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.WriteEndElement();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.Flush();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;font-size:85%;&quot;&gt;myXmlTextWriter.Close();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;WriteStartDocument(Boolean) - writes the xml declaration with the version 1.0 and the standalone attribute.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;WriteComment - writes a comment containing the specified text.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;WriteStartElement - writes the specified start tag.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;WriteElementString - writes an element containing a string value.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;WriteEndElement - writes the specified end tag.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;WriteAttributeString - writes an attribute with a specified value.&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/10/writing-data-into-xml-files.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-4286270401462843152</guid><pubDate>Wed, 17 Oct 2007 08:25:00 +0000</pubDate><atom:updated>2007-10-17T14:32:52.467+06:00</atom:updated><title>DevDay 2007</title><description>&lt;span style=&quot;font-size:85%;&quot;&gt;Yesterday I&#39;ve been to &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;DevDay&lt;/span&gt; 2007 organized by &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;Sri&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;Lanka&lt;/span&gt; .Net forum held at Mount Lavinia hotel. There were 4 interesting technical sessions and later the party. All the 4 sessions were great. It was worth to attend.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Discover Next Generation Visual Studio and .NET 3.5&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;An Adventure with C# 3.0 and &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;LINQ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;By: &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;Chua&lt;/span&gt; Wen &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;Ching&lt;/span&gt;  (MVP - C#)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;WPF&lt;/span&gt;, a new way of looking @ your Windows Applications&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;Silverlight&lt;/span&gt;: The web just got richer&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;By: T.N.C. &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;Venkata&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;Rangan&lt;/span&gt; (Microsoft Regional Director)&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/10/devday-2007.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>0</thr:total></item></channel></rss>