<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" 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>Thu, 22 Sep 2011 12:28:47 +0000</lastBuildDate><category>Development</category><category>CLR</category><category>Cricket</category><category>.Net</category><category>SQL Server</category><title>Down Memory Lane</title><description /><link>http://nalakahewage.blogspot.com/</link><managingEditor>noreply@blogger.com (Nalaka)</managingEditor><generator>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/nalakahewage" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="nalakahewage" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><link>http://nalakahewage.blogspot.com</link><url>http://www.feedburner.com/fb/images/pub/fb_pwrd.gif</url><title>RSS Feed</title></image><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'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's changes as the Admin. But the Visual Studio Team Foundation Server, you don't have the GUI to achieve this. So you'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="http://3.bp.blogspot.com/-Xo0gIAeYSRU/ThQC3m4eS3I/AAAAAAAAAHY/1XsGLazCwZA/s1600/tfs.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 700px; height: 350px;" src="http://3.bp.blogspot.com/-Xo0gIAeYSRU/ThQC3m4eS3I/AAAAAAAAAHY/1XsGLazCwZA/s400/tfs.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5626124988846066546" /&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="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-5371258182219581845?l=nalakahewage.blogspot.com' alt='' /&gt;&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="http://3.bp.blogspot.com/-Xo0gIAeYSRU/ThQC3m4eS3I/AAAAAAAAAHY/1XsGLazCwZA/s72-c/tfs.JPG" height="72" width="72" /><thr:total>1</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>2010-09-02T17:39:38.929+06:00</atom:updated><title>Using Microsoft Data Access Application Block</title><description>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'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="text-align: justify;"&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'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'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 large maintenance projects.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&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's performance is quite good and It's easy to integrate to your application. Most of all with entlib 5.0 provides some ORM like features.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&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="http://entlib.codeplex.com/"&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 onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_gCKpLXhpOU0/TH-Mu3Bea-I/AAAAAAAAAHE/hgGt5DB92TQ/s1600/config.JPG"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 68px;" src="http://3.bp.blogspot.com/_gCKpLXhpOU0/TH-Mu3Bea-I/AAAAAAAAAHE/hgGt5DB92TQ/s400/config.JPG" alt="" id="BLOGGER_PHOTO_ID_5512279205596785634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&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;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Executing SQL statement&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_gCKpLXhpOU0/TH-K9tTy0mI/AAAAAAAAAGM/pazk7jOfsCM/s1600/executing+sql+statments.JPG"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 55px;" src="http://2.bp.blogspot.com/_gCKpLXhpOU0/TH-K9tTy0mI/AAAAAAAAAGM/pazk7jOfsCM/s400/executing+sql+statments.JPG" alt="" id="BLOGGER_PHOTO_ID_5512277261664047714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Executing Stored procedures&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_gCKpLXhpOU0/TH-LXUfKKSI/AAAAAAAAAGU/kGZ8CdfqTUo/s1600/executing+sp.JPG"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 37px;" src="http://1.bp.blogspot.com/_gCKpLXhpOU0/TH-LXUfKKSI/AAAAAAAAAGU/kGZ8CdfqTUo/s400/executing+sp.JPG" alt="" id="BLOGGER_PHOTO_ID_5512277701677426978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Here you don'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;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Execute stored procedures with output parameters&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_gCKpLXhpOU0/TH-LlkNMNmI/AAAAAAAAAGc/sKGeMPynXoY/s1600/with+out+param.JPG"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 141px;" src="http://4.bp.blogspot.com/_gCKpLXhpOU0/TH-LlkNMNmI/AAAAAAAAAGc/sKGeMPynXoY/s400/with+out+param.JPG" alt="" id="BLOGGER_PHOTO_ID_5512277946415199842" border="0" /&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="text-align: justify;"&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 "ExecuteSprocAccessor" and "ExecuteSqlStringAccessor" where you can return user defined element type record sets which make it more interesting to use entlib DAAB. Here I'll explain how to use these 2 methods.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&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 onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_gCKpLXhpOU0/TH-L1ytzo7I/AAAAAAAAAGk/etVxssB321w/s1600/class.JPG"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 306px; height: 185px;" src="http://4.bp.blogspot.com/_gCKpLXhpOU0/TH-L1ytzo7I/AAAAAAAAAGk/etVxssB321w/s400/class.JPG" alt="" id="BLOGGER_PHOTO_ID_5512278225188004786" border="0" /&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 onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_gCKpLXhpOU0/TH-MFWyJl4I/AAAAAAAAAGs/fKjsbdxIG6g/s1600/sp.JPG"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 144px;" src="http://4.bp.blogspot.com/_gCKpLXhpOU0/TH-MFWyJl4I/AAAAAAAAAGs/fKjsbdxIG6g/s400/sp.JPG" alt="" id="BLOGGER_PHOTO_ID_5512278492567934850" border="0" /&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 "ExecuteSprocAccessor" method to retrieve a list of users.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_gCKpLXhpOU0/TH-MWxMVJJI/AAAAAAAAAG0/anWLi5YUBGw/s1600/sproc.JPG"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 33px;" src="http://2.bp.blogspot.com/_gCKpLXhpOU0/TH-MWxMVJJI/AAAAAAAAAG0/anWLi5YUBGw/s400/sproc.JPG" alt="" id="BLOGGER_PHOTO_ID_5512278791714841746" border="0" /&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 onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_gCKpLXhpOU0/TH-Mg56XdJI/AAAAAAAAAG8/ay5AXYM3Vvs/s1600/sqlstring.JPG"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 42px;" src="http://4.bp.blogspot.com/_gCKpLXhpOU0/TH-Mg56XdJI/AAAAAAAAAG8/ay5AXYM3Vvs/s400/sqlstring.JPG" alt="" id="BLOGGER_PHOTO_ID_5512278965854106770" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-3787481824776188744?l=nalakahewage.blogspot.com' alt='' /&gt;&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="http://3.bp.blogspot.com/_gCKpLXhpOU0/TH-Mu3Bea-I/AAAAAAAAAHE/hgGt5DB92TQ/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="text-align: justify;"&gt;I just wanted to install SQL Server 2008 Management Studio on my notebook. I couldn'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="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_gCKpLXhpOU0/TAy3d_BakzI/AAAAAAAAAFM/iZgFrH3dMAA/s1600/nalaka.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_gCKpLXhpOU0/TAy3d_BakzI/AAAAAAAAAFM/iZgFrH3dMAA/s400/nalaka.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5479956572364510002" /&gt;&lt;/a&gt;&lt;div style="text-align: justify;"&gt;I've done this installation numerous times in the past but as I remember I never came across this kind of an issue. I couldn't continue the installation since one of the setup rules were started to fail. Simply the setup couldn't restart the computer. I restarted the machine couple of times but It didn't do any change. Then I realized(assumed) system needs a reboot but it couldn'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="text-align: justify;"&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'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="http://www.symantec.com/connect/articles/pending-file-rename-operations"&gt;http://www.symantec.com/connect/articles/pending-file-rename-operations&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-6176734109171894625?l=nalakahewage.blogspot.com' alt='' /&gt;&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="http://4.bp.blogspot.com/_gCKpLXhpOU0/TAy3d_BakzI/AAAAAAAAAFM/iZgFrH3dMAA/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="justify"&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'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'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'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 "hovered" characteristic in the parent menu item. I used a built-in javascript function in menu control. In mouse over event it finds the item's parent menu item and fires the "mouseover" 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 "onmouseout" 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="font-family:courier new;"&gt;1: &lt;'script' type&lt;span style="color:#339999;"&gt;="text/javascript"&lt;/span&gt; language&lt;span style="color:#336666;"&gt;=&lt;/span&gt;&lt;span style="color:#339999;"&gt;"javascript"&lt;/span&gt;&gt;&lt;br /&gt;2:&lt;br /&gt;3: &lt;span style="color:#3333ff;"&gt;var&lt;/span&gt; fw_Menu_Unhover;&lt;br /&gt;4: &lt;span style="color:#3333ff;"&gt;var&lt;/span&gt; fw_Menu_HoverDynamic;&lt;br /&gt;5:&lt;br /&gt;6: &lt;span style="color:#3333ff;"&gt;function&lt;/span&gt; SetupInterceptors(){ &lt;span style="color:#009900;"&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="color:#3333ff;"&gt;function&lt;/span&gt; my_Menu_HoverDynamic(item) {&lt;br /&gt;14: fw_Menu_HoverDynamic(item);&lt;br /&gt;15: &lt;span style="color:#3333ff;"&gt;var&lt;/span&gt; x = Menu_FindParentItem(item);&lt;br /&gt;16: &lt;span style="color:#3333ff;"&gt;if&lt;/span&gt;(x &amp;amp;&amp;amp; x.tagName.toLowerCase() != &lt;span style="color:#339999;"&gt;"body"&lt;/span&gt;)&lt;br /&gt;17: x.fireEvent(&lt;span style="color:#339999;"&gt;"onmouseover"&lt;/span&gt;);&lt;br /&gt;18: }&lt;br /&gt;19:&lt;br /&gt;20: &lt;span style="color:#3333ff;"&gt;function&lt;/span&gt; my_Menu_Unhover(item) {&lt;br /&gt;21: fw_Menu_Unhover(item);&lt;br /&gt;22: &lt;span style="color:#3333ff;"&gt;var&lt;/span&gt; x = Menu_FindParentItem(item);&lt;br /&gt;23: &lt;span style="color:#3333ff;"&gt;if&lt;/span&gt;(x &amp;amp;&amp;amp; x.tagName.toLowerCase() != &lt;span style="color:#339999;"&gt;"body"&lt;/span&gt;)&lt;br /&gt;24: x.fireEvent&lt;span style="color:#339999;"&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;"&lt;/span&gt;&lt;span style="color:#339999;"&gt;onmouseout"&lt;/span&gt;);&lt;br /&gt;25: }&lt;br /&gt;26:&lt;br /&gt;27: &lt;'/script'&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here it goes. My custom functions replace the menu control's built-in functions and provide the desired result.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-1884744644463161849?l=nalakahewage.blogspot.com' alt='' /&gt;&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="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_gCKpLXhpOU0/S-Ki2xzH6gI/AAAAAAAAAE8/I5e4i165K9E/s1600/Capture.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 154px;" src="http://3.bp.blogspot.com/_gCKpLXhpOU0/S-Ki2xzH6gI/AAAAAAAAAE8/I5e4i165K9E/s400/Capture.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5468111959545604610" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_gCKpLXhpOU0/S-KitIBD74I/AAAAAAAAAE0/tgUZyjP6Zfo/s1600/Capture1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 177px;" src="http://4.bp.blogspot.com/_gCKpLXhpOU0/S-KitIBD74I/AAAAAAAAAE0/tgUZyjP6Zfo/s400/Capture1.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5468111793710952322" /&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="http://www.telegraph.co.uk/technology/3356874/The-101-most-useful-websites.html"&gt;http://www.telegraph.co.uk/technology/3356874/The-101-most-useful-websites.html&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-3344900968678967150?l=nalakahewage.blogspot.com' alt='' /&gt;&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="http://3.bp.blogspot.com/_gCKpLXhpOU0/S-Ki2xzH6gI/AAAAAAAAAE8/I5e4i165K9E/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="justify"&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="color:#333399;"&gt;CREATE PROCEDURE&lt;/span&gt; [dbo].[Employee_GetByIds]&lt;br /&gt;@IDs &lt;span style="color:#333399;"&gt;VARCHAR&lt;/span&gt;(1000)&lt;br /&gt;&lt;span style="color:#000099;"&gt;&lt;span style="color:#333399;"&gt;AS&lt;br /&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#009900;"&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="color:#333399;"&gt;SET NOCOUNT ON&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;SELECT&lt;/span&gt; Id,FirstName, LastName, Address, Phone &lt;span style="color:#333399;"&gt;FROM&lt;/span&gt; Employee &lt;span style="color:#333399;"&gt;WHERE&lt;/span&gt; Id &lt;span style="color:#666666;"&gt;IN&lt;/span&gt; (@IDs)&lt;br /&gt;&lt;span style="color:#000099;"&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="color:#333399;"&gt;ALTER FUNCTION&lt;/span&gt; [dbo].[Splitter] (@IDs &lt;span style="color:#333399;"&gt;VARCHAR&lt;/span&gt;(100) )&lt;br /&gt;&lt;span style="color:#333399;"&gt;RETURNS&lt;/span&gt; @Tbl_IDs &lt;span style="color:#333399;"&gt;TABLE&lt;/span&gt;(ID &lt;span style="color:#333399;"&gt;INT&lt;/span&gt;) &lt;span style="color:#333399;"&gt;AS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;-- Append comma&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;SET&lt;/span&gt; @IDs = @IDs + &lt;span style="color:#990000;"&gt;','&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;-- Indexes to keep the position of searching&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;DECLARE&lt;/span&gt; @Pos1 &lt;span style="color:#333399;"&gt;INT&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;DECLARE&lt;/span&gt; @pos2 &lt;span style="color:#333399;"&gt;INT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;-- Start from first character&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;SET&lt;/span&gt; @Pos1=1&lt;br /&gt;&lt;span style="color:#333399;"&gt;SET&lt;/span&gt; @Pos2=1&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;WHILE&lt;/span&gt; @Pos1&lt;len(@ids)&gt; &lt; &lt;span style="color:#cc33cc;"&gt;LEN&lt;/span&gt;(@IDs)&lt;br /&gt;&lt;span style="color:#333399;"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;SET&lt;/span&gt; @Pos1 = &lt;span style="color:#cc33cc;"&gt;CHARINDEX&lt;/span&gt;(&lt;span style="color:#cc0000;"&gt;','&lt;/span&gt;,@IDs,@Pos1)&lt;br /&gt;&lt;span style="color:#333399;"&gt;INSERT&lt;/span&gt; @Tbl_IDs &lt;span style="color:#333399;"&gt;SELECT&lt;/span&gt; &lt;span style="color:#cc33cc;"&gt;CASE&lt;/span&gt;(&lt;span style="color:#cc33cc;"&gt;SUBSTRING&lt;/span&gt;(@IDs,@Pos2,@Pos1-@Pos2) &lt;span style="color:#333399;"&gt;AS INT&lt;/span&gt;)&lt;br /&gt;&lt;span style="color:#009900;"&gt;-- Go to next non comma character&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;SET&lt;/span&gt; @Pos2=@Pos1+1&lt;br /&gt;&lt;span style="color:#009900;"&gt;-- Search from the next charcater&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#333399;"&gt;SET&lt;/span&gt; @Pos1 = @Pos1+1&lt;br /&gt;&lt;span style="color:#333399;"&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="color:#333399;"&gt;ALTER PROCEDURE&lt;/span&gt; [dbo].[SourceDocument_GetByIDs]&lt;br /&gt;@IDs &lt;span style="color:#333399;"&gt;VARCHAR&lt;/span&gt;(1000)&lt;br /&gt;&lt;span style="color:#333399;"&gt;AS&lt;br /&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&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="color:#333399;"&gt;SET NOCOUNT ON&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;Id,FirstName, LastName, Address, Phone &lt;span style="color:#333399;"&gt;FROM&lt;/span&gt; Employee &lt;span style="color:#333399;"&gt;WHERE&lt;/span&gt; Id &lt;span style="color:#666666;"&gt;IN&lt;/span&gt; (&lt;span style="color:#333399;"&gt;SELECT&lt;/span&gt; ID &lt;span style="color:#333399;"&gt;FROM&lt;/span&gt; Splitter(@IDs))&lt;br /&gt;&lt;span style="color:#333399;"&gt;END&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-1055858673056580293?l=nalakahewage.blogspot.com' alt='' /&gt;&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#">Development</category><category domain="http://www.blogger.com/atom/ns#">.Net</category><category domain="http://www.blogger.com/atom/ns#">CLR</category><title>Application Domain</title><description>&lt;div align="justify"&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="http://4.bp.blogspot.com/_gCKpLXhpOU0/S6Xw37RtjuI/AAAAAAAAAEM/cFZi5C-mB20/s1600-h/1.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 287px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5451027767597305570" border="0" alt="" src="http://4.bp.blogspot.com/_gCKpLXhpOU0/S6Xw37RtjuI/AAAAAAAAAEM/cFZi5C-mB20/s400/1.jpg" /&gt; &lt;p align="justify"&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="http://1.bp.blogspot.com/_gCKpLXhpOU0/S6Xxf3_66uI/AAAAAAAAAEU/z3geT5lVbWk/s1600-h/2.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 287px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5451028453912144610" border="0" alt="" src="http://1.bp.blogspot.com/_gCKpLXhpOU0/S6Xxf3_66uI/AAAAAAAAAEU/z3geT5lVbWk/s400/2.jpg" /&gt; &lt;p align="justify"&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="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-1412320127813016569?l=nalakahewage.blogspot.com' alt='' /&gt;&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="http://4.bp.blogspot.com/_gCKpLXhpOU0/S6Xw37RtjuI/AAAAAAAAAEM/cFZi5C-mB20/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="http://2.bp.blogspot.com/_gCKpLXhpOU0/S5Xcirz0VVI/AAAAAAAAAD8/BfKDa2vo0KI/s1600-h/IMAGE_222.jpg"&gt;&lt;img style="MARGIN: 0px 0px 10px 10px; WIDTH: 200px; FLOAT: right; HEIGHT: 150px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5446501812808209746" border="0" alt="" src="http://2.bp.blogspot.com/_gCKpLXhpOU0/S5Xcirz0VVI/AAAAAAAAAD8/BfKDa2vo0KI/s200/IMAGE_222.jpg" /&gt;&lt;/a&gt; &lt;a href="http://1.bp.blogspot.com/_gCKpLXhpOU0/S5XcaHytL8I/AAAAAAAAAD0/8gYyK-09s0M/s1600-h/IMAGE_214.jpg"&gt;&lt;img style="MARGIN: 0px 0px 10px 10px; WIDTH: 200px; FLOAT: right; HEIGHT: 150px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5446501665700917186" border="0" alt="" src="http://1.bp.blogspot.com/_gCKpLXhpOU0/S5XcaHytL8I/AAAAAAAAAD0/8gYyK-09s0M/s200/IMAGE_214.jpg" /&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="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-3412842848444444348?l=nalakahewage.blogspot.com' alt='' /&gt;&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="http://2.bp.blogspot.com/_gCKpLXhpOU0/S5Xcirz0VVI/AAAAAAAAAD8/BfKDa2vo0KI/s72-c/IMAGE_222.jpg" height="72" width="72" /><thr:total>0</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've been doing re-engineering work of a project for the past couple of months. It's bit difficult to do re-engineering work rather than doing sometihng from the scratch because you'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'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="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&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="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_gCKpLXhpOU0/S2lgvMV2B1I/AAAAAAAAAB8/hAp13BLnlTo/s1600-h/1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="http://2.bp.blogspot.com/_gCKpLXhpOU0/S2lgvMV2B1I/AAAAAAAAAB8/hAp13BLnlTo/s320/1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5433980789282178898" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&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="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_gCKpLXhpOU0/S2lhO4GGReI/AAAAAAAAACE/m-tuQsR_bpY/s1600-h/2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 318px;" src="http://1.bp.blogspot.com/_gCKpLXhpOU0/S2lhO4GGReI/AAAAAAAAACE/m-tuQsR_bpY/s320/2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5433981333603239394" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Step 3 : You'll see the change script on a popup window&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_gCKpLXhpOU0/S2lhp-WOIYI/AAAAAAAAACM/4uyMGMUrvFk/s1600-h/3.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 254px;" src="http://1.bp.blogspot.com/_gCKpLXhpOU0/S2lhp-WOIYI/AAAAAAAAACM/4uyMGMUrvFk/s320/3.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5433981799137943938" /&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="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&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="Apple-style-span"  style="font-size:x-small;"&gt;BEGIN TRANSACTION&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SET QUOTED_IDENTIFIER ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SET ARITHABORT ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SET NUMERIC_ROUNDABORT OFF&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SET CONCAT_NULL_YIELDS_NULL ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SET ANSI_NULLS ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SET ANSI_PADDING ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SET ANSI_WARNINGS ON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;COMMIT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;BEGIN TRANSACTION&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;CREATE TABLE dbo.Tmp_Customer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;(&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;Id int NOT NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;FirstName varchar(50) NOT NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;LastName varchar(50) NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;WorkPhone varchar(50) NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;MobilePhone varchar(50) NULL,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;RegisteredDate smalldatetime NOT NULL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;)  ON [PRIMARY]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;IF EXISTS(SELECT * FROM dbo.Customer)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; EXEC('INSERT INTO dbo.Tmp_Customer (Id, FirstName, LastName, WorkPhone, MobilePhone, RegisteredDate)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SELECT Id, FirstName, LastName, WorkPhone, MobilePhone, CONVERT(smalldatetime, RegisteredDate) FROM dbo.Customer WITH (HOLDLOCK TABLOCKX)')&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;DROP TABLE dbo.Customer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;EXECUTE sp_rename N'dbo.Tmp_Customer', N'Customer', 'OBJECT' &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ALTER TABLE dbo.Customer ADD CONSTRAINT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;PK_Customer PRIMARY KEY CLUSTERED &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;(&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;Id&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&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="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&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'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="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"&gt;download&lt;/a&gt; this database publishing tool as a separate software.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-3035952688069359500?l=nalakahewage.blogspot.com' alt='' /&gt;&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="http://2.bp.blogspot.com/_gCKpLXhpOU0/S2lgvMV2B1I/AAAAAAAAAB8/hAp13BLnlTo/s72-c/1.jpg" height="72" width="72" /><thr:total>1</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="font-size:85%;"&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="font-size:85%;"&gt;It'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="font-size:85%;"&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="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;LINQ query/operators&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;string[]&lt;/span&gt; names = { &lt;span style="color:#990000;"&gt;"Ajantha"&lt;span style="color:#000000;"&gt;,&lt;/span&gt; "Gayan"&lt;span style="color:#000000;"&gt;,&lt;/span&gt; "Jennifer"&lt;span style="color:#000000;"&gt;,&lt;/span&gt; "Leo"&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="color:#990000;"&gt;"Nalaka"&lt;span style="color:#000000;"&gt;,&lt;/span&gt; "Rasika"&lt;span style="color:#000000;"&gt;,&lt;/span&gt; "Rajitha"&lt;span style="color:#000000;"&gt;,&lt;/span&gt; "Randy"&lt;/span&gt; };&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="color:#339999;"&gt;IEnumerable&lt;/span&gt;&lt;&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt;&gt; query = &lt;span style="color:#3333ff;"&gt;from&lt;/span&gt; q &lt;span style="color:#3333ff;"&gt;in&lt;/span&gt; names&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;where&lt;/span&gt; q.Length == 6&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;orderby&lt;/span&gt; q&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;select&lt;/span&gt; q.ToUpper(); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; name &lt;span style="color:#3333ff;"&gt;in&lt;/span&gt; query) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Response.Write(name + &lt;span style="color:#990000;"&gt;"  "&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;if you compile and run this code you'll see the output,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;NALAKA &lt;/span&gt; &lt;span style="font-size:85%;"&gt;RASIKA&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&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="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="color:#339999;"&gt;IEnumerable&lt;/span&gt;&lt;&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt;&gt; query = names&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;.Where(s =&gt; s.Length == 6)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;.OrderBy(s =&gt; s) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;.Select(s =&gt; s.ToUpper());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&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="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-2889480294091948160?l=nalakahewage.blogspot.com' alt='' /&gt;&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="font-family:trebuchet ms;font-size:85%;"&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="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#339999;"&gt;DataRow[]&lt;/span&gt; foundRows = dt.Select(&lt;span style="color:#990000;"&gt;"firstName+' '+lastName='"&lt;/span&gt; + SearchString + &lt;span style="color:#990000;"&gt;"'"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; i = 0; i &lt;&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;{   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;   dt.Rows.Remove(foundRows[i]);   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;   dt.Rows.InsertAt(foundRows[i],i);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;I didn'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="font-family:trebuchet ms;font-size:85%;"&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="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#339999;"&gt;DataRow[]&lt;/span&gt; foundRows = dt.Select(&lt;span style="color:#990000;"&gt;"firstName+' '+lastName='"&lt;/span&gt; + SearchString + &lt;span style="color:#990000;"&gt;"'"&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;for&lt;/span&gt; (&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; i = 0; i &lt; foundRows.Length; i++)&lt;br /&gt;{&lt;br /&gt;   &lt;span style="color:#339999;"&gt;DataRow&lt;/span&gt; dr = dt.NewRow();&lt;br /&gt;   dr[&lt;span style="color:#990000;"&gt;"id"&lt;/span&gt;] = foundRows[i][&lt;span style="color:#990000;"&gt;"id"&lt;/span&gt;];&lt;br /&gt;   dr[&lt;span style="color:#990000;"&gt;"FirstName"&lt;/span&gt;] = foundRows[i][&lt;span style="color:#990000;"&gt;"FirstName"&lt;/span&gt;];&lt;br /&gt;   dr[&lt;span style="color:#990000;"&gt;"LastName"&lt;/span&gt;] = foundRows[i][&lt;span style="color:#990000;"&gt;"LastName"&lt;/span&gt;];&lt;br /&gt;   dr[&lt;span style="color:#990000;"&gt;"Title"&lt;/span&gt;] = foundRows[i][&lt;span style="color:#990000;"&gt;"Title"&lt;/span&gt;];&lt;br /&gt;   dr[&lt;span style="color:#990000;"&gt;"Location"&lt;/span&gt;] = foundRows[i][&lt;span style="color:#990000;"&gt;"Location"&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="font-family:times new roman;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&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="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-6297581324565897319?l=nalakahewage.blogspot.com' alt='' /&gt;&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="font-size:85%;"&gt;&lt;span&gt;Diesel prices increased from Rs.80 to Rs.130. It'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="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-683596503436681853?l=nalakahewage.blogspot.com' alt='' /&gt;&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="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;if&lt;/span&gt; (obj ==&lt;span style="color:#3333ff;"&gt; null&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&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 'undefined'. So check undefined.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;if&lt;/span&gt;(&lt;span style="color:#3333ff;"&gt;typeof&lt;/span&gt; obj ==&lt;span style="color:#993300;"&gt; 'undefined'&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-1419625213144152802?l=nalakahewage.blogspot.com' alt='' /&gt;&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="font-size:85%;"&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="color:#3333ff;"&gt;&lt;span style="font-family:courier new;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; (Request.QueryString[&lt;/span&gt;&lt;span style="color:#993300;"&gt;&lt;span style="font-family:courier new;"&gt;"param1"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;] != &lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="font-family:courier new;"&gt;null&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;  param1 = Request.QueryString[&lt;span style="color:#993300;"&gt;"param1"&lt;/span&gt;];&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;else&lt;/span&gt;&lt;br /&gt;  param1 = &lt;/span&gt;&lt;span style="color:#993300;"&gt;&lt;span style="font-family:courier new;"&gt;""&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After the introduction of the "?" operator I used to write the same piece of code as,&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; param1 = Request.QueryString[&lt;/span&gt;&lt;span style="color:#993300;"&gt;&lt;span style="font-family:courier new;"&gt;"param1"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;] != &lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="font-family:courier new;"&gt;null&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; ? Request.QueryString[&lt;span style="color:#993300;"&gt;"param1"&lt;/span&gt;].ToString() : &lt;span style="color:#993300;"&gt;""&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;C# has introduced another operator which is "??". It is used to replace null. So I'll kept in mind that to force myself to use "??" operator where I can use it as,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; param1 = Request.QueryString[&lt;span style="color:#993300;"&gt;"param1"&lt;/span&gt;] ?? &lt;/span&gt;&lt;span style="color:#993300;"&gt;&lt;span style="font-family:courier new;"&gt;""&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:0;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:0;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-274094616791552925?l=nalakahewage.blogspot.com' alt='' /&gt;&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="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_gCKpLXhpOU0/R3H6Pm_aEAI/AAAAAAAAAAc/coO4A51u-cU/s1600-h/camera.JPG"&gt;&lt;img src="http://bp3.blogger.com/_gCKpLXhpOU0/R3H6Pm_aEAI/AAAAAAAAAAc/coO4A51u-cU/s200/camera.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5148170995132665858" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Finally I decided to settle with Sony Cybershot DSC H7. It'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" LCD Screen, W: Approx. 50cm to Infinity, T: Approx. 120cm to Infinity auto focus range and many more &lt;a href="http://www.sony-asia.com/product/dsc-h7/sku/dsc-h7%252Fb%2B%2B%2B%2Be32?site=hp_en_AP_i"&gt;features&lt;/a&gt;. It cost  US$ 409 and it really worth for the price. So I'm looking forward to capture some scenes (specially natural and wild life) with this new smart piece. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-1855683494625040475?l=nalakahewage.blogspot.com' alt='' /&gt;&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="http://bp3.blogger.com/_gCKpLXhpOU0/R3H6Pm_aEAI/AAAAAAAAAAc/coO4A51u-cU/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="font-size:85%;"&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="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Xml;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;span style="color:#339999;"&gt;XmlTextWriter&lt;/span&gt; myXmlTextWriter = &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; &lt;span style="color:#339999;"&gt;XmlTextWriter&lt;/span&gt;(&lt;span style="color:#990000;"&gt;"student.xml"&lt;/span&gt;, &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.Formatting = &lt;span style="color:#339999;"&gt;Formatting&lt;/span&gt;.Indented;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteStartDocument(&lt;span style="color:#3333ff;"&gt;false&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteDocType(&lt;span style="color:#990000;"&gt;"students"&lt;/span&gt;, &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;, &lt;span style="color:#990000;"&gt;"students.dtd"&lt;/span&gt;, &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteComment(&lt;span style="color:#990000;"&gt;"This file represents a student in the institute"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteStartElement(&lt;span style="color:#990000;"&gt;"students"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteStartElement(&lt;span style="color:#990000;"&gt;"student"&lt;/span&gt;, &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteAttributeString(&lt;span style="color:#990000;"&gt;"id"&lt;/span&gt;,&lt;span style="color:#990000;"&gt;"BCS00094"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteAttributeString(&lt;span style="color:#990000;"&gt;"category"&lt;/span&gt;, &lt;span style="color:#990000;"&gt;"Bsc"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteAttributeString(&lt;span style="color:#990000;"&gt;"course"&lt;/span&gt;, &lt;span style="color:#990000;"&gt;"Computer Science"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteElementString(&lt;span style="color:#990000;"&gt;"birthdate"&lt;/span&gt;, &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;, &lt;span style="color:#990000;"&gt;"1979-05-22"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteStartElement(&lt;span style="color:#990000;"&gt;"Name"&lt;/span&gt;, &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteElementString(&lt;span style="color:#990000;"&gt;"first-name"&lt;/span&gt;, &lt;span style="color:#990000;"&gt;"Shawn"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteElementString(&lt;span style="color:#990000;"&gt;"last-name"&lt;/span&gt;, &lt;span style="color:#990000;"&gt;"Tait"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteEndElement();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteElementString(&lt;span style="color:#990000;"&gt;"GPA"&lt;/span&gt;, &lt;span style="color:#990000;"&gt;"4.55"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteEndElement();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.WriteEndElement();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.Flush();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;myXmlTextWriter.Close();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&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="font-size:85%;"&gt;WriteComment - writes a comment containing the specified text.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;WriteStartElement - writes the specified start tag.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;WriteElementString - writes an element containing a string value.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;WriteEndElement - writes the specified end tag.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;WriteAttributeString - writes an attribute with a specified value.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-4749986489637484851?l=nalakahewage.blogspot.com' alt='' /&gt;&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="font-size:85%;"&gt;Yesterday I've been to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;DevDay&lt;/span&gt; 2007 organized by &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Sri&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&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="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Discover Next Generation Visual Studio and .NET 3.5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;An Adventure with C# 3.0 and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;LINQ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;By: &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Chua&lt;/span&gt; Wen &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Ching&lt;/span&gt;  (MVP - C#)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;WPF&lt;/span&gt;, a new way of looking @ your Windows Applications&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Silverlight&lt;/span&gt;: The web just got richer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;By: T.N.C. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;Venkata&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;Rangan&lt;/span&gt; (Microsoft Regional Director)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-4286270401462843152?l=nalakahewage.blogspot.com' alt='' /&gt;&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><item><guid isPermaLink="false">tag:blogger.com,1999:blog-16754652.post-8165942176559641980</guid><pubDate>Tue, 02 Oct 2007 05:54:00 +0000</pubDate><atom:updated>2007-10-02T12:17:03.019+06:00</atom:updated><title>Rugby World Cup 2007 - Knockout Stage</title><description>&lt;span style="font-size:85%;"&gt;&lt;span&gt;&lt;span&gt;Rugby World Cup 2007 first round is over and 8 teams were selected to play the second stage. This will be a knockout out stage and unbeaten team in next 3 games will get the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;opportunity&lt;/span&gt; to lift the cup and crown as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;RWC&lt;/span&gt; 2007 champs.&lt;br /&gt;&lt;br /&gt;As the tournament started with a upset by Argentina beating host France, Argentina managed to continue their rhythm and finish the first round as the top of their pool. They will be a strong contender in the knockout stage and it'll be a very interesting quarterfinal Argentina Vs Scotland.&lt;br /&gt;Fiji managed to enter to the second round by beating Wales. So they'll meet South Africa in their first match in the second round.&lt;br /&gt;&lt;br /&gt;Other 2 quarterfinals will be Australia Vs England and New Zealand Vs France. New Zealand finished all their first round &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;matches&lt;/span&gt; very promisingly and they are the favorites in this tournament. But their lack of performances in the big games is always a huge disadvantage for them and also France is seeking for an opportunity to cover their humiliation  defeat by Argentina in the first round, so they'll play their hearts out in front of their own crowd, in their own grounds. &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;Nevertheless&lt;/span&gt; as I said earlier this is the best NZ team in a world cup after 1992 So they'll smell the cup as no one else does.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-8165942176559641980?l=nalakahewage.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/10/rugby-world-cup-2007-knockout-stage.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-7155366888319996125</guid><pubDate>Tue, 02 Oct 2007 04:54:00 +0000</pubDate><atom:updated>2007-10-02T11:17:55.515+06:00</atom:updated><title>Creating a new XML file using XMLDocument</title><description>&lt;span style="font-size:85%;"&gt;Here is the XML file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:#990000;"&gt;xml&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#ff0000;"&gt;version&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#3333ff;"&gt;=&lt;/span&gt;"&lt;span style="color:#3333ff;"&gt;1.0&lt;/span&gt;" &lt;span style="color:#ff0000;"&gt;encoding&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;=&lt;/span&gt;"&lt;span style="color:#3333ff;"&gt;utf-8&lt;/span&gt;"&lt;span style="color:#3333ff;"&gt;?&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;&lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#990000;"&gt;Students&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color:#3333ff;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#990000;"&gt;Student&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color:#3333ff;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#990000;"&gt;id&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&gt;&lt;/span&gt;1&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#990000;"&gt;id&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color:#3333ff;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#990000;"&gt;name&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&gt;&lt;/span&gt;Michael Jones&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#990000;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#3333ff;"&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#990000;"&gt;Student&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#990000;"&gt;Students&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;Here is the code to generate the XML file:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Xml;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#339999;"&gt;XmlDocument&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; xmlDoc = new &lt;span style="color:#339999;"&gt;XmlDocument&lt;/span&gt;();&lt;br /&gt;&lt;span style="color:#339999;"&gt;XmlDeclaration&lt;/span&gt; xmlDeclaration = xmlDoc.CreateXmlDeclaration("1.0", "utf-8", &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#009900;"&gt;// Create the root element&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="color:#339999;"&gt;XmlElement&lt;/span&gt; rootNode = xmlDoc.CreateElement(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#990000;"&gt;"Students"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;);&lt;br /&gt;xmlDoc.InsertBefore(xmlDeclaration, xmlDoc.DocumentElement);&lt;br /&gt;xmlDoc.AppendChild(rootNode);&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;// Creating the parent node&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339999;"&gt;XmlElement&lt;/span&gt; parentNode = xmlDoc.CreateElement(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#990000;"&gt;"Student"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;);&lt;br /&gt;xmlDoc.DocumentElement.AppendChild(parentNode);&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;// Create the required nodes&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339999;"&gt;XmlElement&lt;/span&gt; eleId = xmlDoc.CreateElement(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#990000;"&gt;"id"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;);&lt;br /&gt;&lt;span style="color:#339999;"&gt;XmlElement&lt;/span&gt; eleName = xmlDoc.CreateElement(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#990000;"&gt;"name"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;// retrieve the text&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#339999;"&gt;XmlText&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; textId = xmlDoc.CreateTextNode(&lt;span style="color:#990000;"&gt;"1"&lt;/span&gt;);&lt;br /&gt;&lt;span style="color:#339999;"&gt;XmlText&lt;/span&gt; textName = xmlDoc.CreateTextNode(&lt;span style="color:#990000;"&gt;"Michael Jones"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;// append the nodes to the parentNode without the value&lt;/span&gt;&lt;br /&gt;parentNode.AppendChild(eleId);&lt;br /&gt;parentNode.AppendChild(eleName);&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;// save the value of the fields into the nodes&lt;/span&gt;&lt;br /&gt;eleId.AppendChild(textId);&lt;br /&gt;eleName.AppendChild(textName);&lt;br /&gt;&lt;br /&gt;xmlDoc.Save(Request.MapPath() + &lt;span style="color:#990000;"&gt;"Students.xml"&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-7155366888319996125?l=nalakahewage.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/10/creating-new-xml-file-using-xmldocument.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-8098106232937573314</guid><pubDate>Wed, 12 Sep 2007 15:10:00 +0000</pubDate><atom:updated>2007-09-14T11:18:24.355+06:00</atom:updated><title>Satellite TV</title><description>&lt;span style="font-size:85%;"&gt;           Today I got my satellite TV connection. I'm quite impressed about the setup, devices, picture and audio quality and the service provided by the provider. Anyway still we have only one satellite TV provider in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;sri&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;lanka&lt;/span&gt;. I hope government won't ban satellite TV again in the future and there is no reason to do so.&lt;br /&gt;&lt;br /&gt;           I like mostly the educational channels and the sports channels. Quality of programs broadcast through educational channels are impressive. Children can study so many things from there. I hope now we can see some good/productive programs when we watch TV but I'm not sure that I'd get enough free time to watch TV.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-8098106232937573314?l=nalakahewage.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/09/satellite-tv.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-511929888667869613</guid><pubDate>Mon, 10 Sep 2007 08:42:00 +0000</pubDate><atom:updated>2007-09-10T15:44:02.312+06:00</atom:updated><title>Rugby World Cup 2007 has started</title><description> &lt;span style="font-size:85%;"&gt;&lt;span&gt;         Rugby world cup 2007 has &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;officially&lt;/span&gt; started on the 07&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;th&lt;/span&gt; September 2007 in Paris, France. In the Opening match host &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;France&lt;/span&gt; were beaten 12-17 by Argentina. Top 4 teams, New Zealand, Australia, France, South Africa played their first &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;matches&lt;/span&gt; and it seems top 3 out of 4 teams (&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;France&lt;/span&gt; is current no 2 in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;IRB&lt;/span&gt; rankings) are in good form.&lt;br /&gt;&lt;br /&gt;          New Zealand was awesome against Italy who were beaten by 76-14 and this is the best New Zealand World Cup team I have seen after Sean &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;Fitzpatricks&lt;/span&gt; team in 1992 world cup. 2&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;nd&lt;/span&gt; row Chris Jack, flanker Jerry Collins, No8 Rodney &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;So'oialo&lt;/span&gt;, scrum half Byron &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;Kelleher&lt;/span&gt;, wingers &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;Sitiveni&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Sivivatu&lt;/span&gt;, Doug &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;Howlett&lt;/span&gt; and fullback Leon MacDonald played a great game. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;RWC&lt;/span&gt; is scheduled till 20&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;th&lt;/span&gt; October so there are many more actions to come. I hope we can see some good rugby.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-511929888667869613?l=nalakahewage.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/09/rugby-world-cup-2007-has-started.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-7817150734850543395</guid><pubDate>Mon, 27 Aug 2007 10:29:00 +0000</pubDate><atom:updated>2007-08-27T16:38:07.548+06:00</atom:updated><title>Adding Meta Tags to ASP.Net 2.0 Pages</title><description>&lt;span style="font-size:85%;"&gt;     Recently, I was looking for a way to add meta keywords and description into web pages programmatically. After implementing a method to do that I wanted to add different meta keywords and description to the same page but when loading different data. So I came across with this method which you can change meta keywords and description even with in the same page when loading different data.&lt;br /&gt;&lt;br /&gt;       &lt;span style="color: rgb(51, 153, 153); font-family: courier new;"&gt;HtmlMeta &lt;/span&gt;&lt;span style="font-family: courier new;"&gt;htmlMetaDesc = &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new;"&gt;new&lt;/span&gt;&lt;span style="font-family: courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 153, 153); font-family: courier new;"&gt;HtmlMeta();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        htmlMetaDesc.Name = &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0); font-family: courier new;"&gt;"Description"&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        htmlMetaDesc.Content = &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0); font-family: courier new;"&gt;"Nalaka Sanjeewa Aluthwala Hewage"&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Page.Header.Controls.Add(htmlMetaDesc);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(51, 153, 153); font-family: courier new;"&gt;HtmlMeta &lt;/span&gt;&lt;span style="font-family: courier new;"&gt;htmlMeta = &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new;"&gt;new&lt;/span&gt;&lt;span style="font-family: courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 153, 153); font-family: courier new;"&gt;HtmlMeta&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        htmlMeta.Name = &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0); font-family: courier new;"&gt;"Keywords"&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        htmlMeta.Content = &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0); font-family: courier new;"&gt;"Nalaka, Sanjeewa, Aluthwala, Hewage"&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Page.Header.Controls.Add(htmlMeta);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-7817150734850543395?l=nalakahewage.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/08/adding-meta-tags-to-aspnet-20-pages.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-7827577111014126483</guid><pubDate>Fri, 24 Aug 2007 11:05:00 +0000</pubDate><atom:updated>2007-08-27T16:12:01.253+06:00</atom:updated><title>Ran Home</title><description>&lt;span style="font-size:85%;"&gt;     It's 107 days for my last post and it's about the new comer to my family, Sedani. I gave up spending time for blogging for the past 107 days as I gave up spending time for couple of things in my regular life style because I wanted to see my little girl is growing.&lt;br /&gt;&lt;br /&gt;     In weekdays, morning I only get couple of minutes to spend with her but sometimes she's in a sleep when I'm leaving. If I come home late she's in a sleep so I hardly get a chance to talk to her, spend sometime with her. So I didn't spend any time at office unnecessarily. As soon as I finished my work at office, I ran home to see my little baby girl.&lt;br /&gt;&lt;br /&gt;     Now she's 109 days old. Now she's responding to most of the things we are doing and saying. She smiles with me, she talks by saying aaahs, uuuhs and heeees. Now she knows me very well. And sometimes she's waiting to see me till I finish my work and coming home.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-7827577111014126483?l=nalakahewage.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/08/ran-home.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-1569484447304142364</guid><pubDate>Wed, 09 May 2007 17:55:00 +0000</pubDate><atom:updated>2007-05-16T17:18:01.754+06:00</atom:updated><title>Name</title><description>&lt;span style="font-size:85%;"&gt;    Today we decided a name to the new comer of our family, our little baby girl.  Her name will be Sedani Dahamdee.  Sedani means clever and instant ideas or solutions by thinking.  Dahamdee means the person who presents dharma.  So I’m glad that I could give her a meaningful name.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-1569484447304142364?l=nalakahewage.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/05/name.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-8580461251081086568</guid><pubDate>Mon, 07 May 2007 10:14:00 +0000</pubDate><atom:updated>2007-05-14T16:19:41.056+06:00</atom:updated><title>I am a father</title><description>&lt;span style="font-size:85%;"&gt;    Dinee gave birth to a baby girl in this evening. She's so tiny and cute. She's the cutest baby in the world to me and undoubtly it was the happiest moment in my life. I can't explain that feeling when i heard our baby is crying for the first time.&lt;br /&gt;&lt;br /&gt;   The experience of bringing a new life to this world is unexplainable. I was looking forward to this day with anticipation but I never thought that I was going to be this exited! When you hear your baby is crying for the first time, you'll feel like that you are beyond the universe, like you have won the greatest thing in this world and you don't need anything else... How can I write that feeling in a blog post?&lt;br /&gt;&lt;br /&gt;   All that time I was with my wife. As a father I appreciate that I was allowed to stay with my wife when she's giving birth to my kid and I think it's something every father should experience. That's the closest you can get to your wife and kid. At Ninewells, fathers are allowed to be with their wives at the birth.&lt;br /&gt;&lt;br /&gt;   I must thank Dr.Nandadeva Senevirathne who was our gynecologist. You guided us from the beginning. You made everything so simple to us and you took everything so seriously. You are one of the best in the field.&lt;br /&gt;&lt;br /&gt;   At Ninewells, enviornment was excellent. I never saw that continuous smiling face, kindness, caring hands of nurses and all the other staff at ninewells. We always felt that we are in a maternity hospital and both the baby and the mother are in safe hands. I think Ninewells is the best maternity hospital.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;RSS&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16754652-8580461251081086568?l=nalakahewage.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://nalakahewage.blogspot.com/2007/05/i-am-father.html</link><author>noreply@blogger.com (Nalaka)</author><thr:total>0</thr:total></item></channel></rss>

