<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://technetsrilanka.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Danushka Silva</title><subtitle type="html">It&amp;#39;s all about SharePoint</subtitle><id>http://technetsrilanka.net/blogs/danushkas/atom.aspx</id><link rel="alternate" type="text/html" href="http://technetsrilanka.net/blogs/danushkas/default.aspx" /><link rel="self" type="application/atom+xml" href="http://technetsrilanka.net/blogs/danushkas/atom.aspx" /><generator uri="http://communityserver.org" version="4.1.31106.3070">Community Server</generator><updated>2009-09-09T17:56:28Z</updated><entry><title>Microsoft Student Champ's Meeting - December, 2010</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2010/12/09/microsoft-student-champ-s-meeting-december-2010.aspx" /><id>/blogs/danushkas/archive/2010/12/09/microsoft-student-champ-s-meeting-december-2010.aspx</id><published>2010-12-09T11:08:04Z</published><updated>2010-12-09T11:08:04Z</updated><content type="html">The Microsoft Student Champ Community had their last meeting of the year 2010, last Friday (3rd Dec). I was given the great opportunity of hosting a session as the guest speaker. It was a wonderful evening! We had a great crowd, of young university students, there. Here are the slides and SharePoint Foundation links for you to download. http://cid-18829c69f065aa97.office.live.com/view.aspx/SharePoint%202010/SharePoint%20%202010%20Deployment.pptx http://www.microsoft.com/downloads/en/details.aspx...(&lt;a href="http://technetsrilanka.net/blogs/danushkas/archive/2010/12/09/microsoft-student-champ-s-meeting-december-2010.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=695" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2010" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2010/default.aspx" /></entry><entry><title>BDC model project deployment error – SharePoint 2010</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2010/12/06/bdc-model-project-deployment-error-sharepoint-2010.aspx" /><id>/blogs/danushkas/archive/2010/12/06/bdc-model-project-deployment-error-sharepoint-2010.aspx</id><published>2010-12-06T06:44:52Z</published><updated>2010-12-06T06:44:52Z</updated><content type="html">I was trying to develop a BDC model project with visual studio 2010 and tried to change the Identifier. Once I changed the Identifier and tried to deploy. There I got an error. In short, error will be like this Error&amp;#160;&amp;#160;&amp;#160; 1&amp;#160;&amp;#160;&amp;#160; Error occurred in deployment step &amp;#39;Add Solution&amp;#39;: Model file &amp;#39;BdcModel1\BdcModel1.bdcm&amp;#39; has the following External Content Type activation errors: TypeDescriptor with Name &amp;#39;Identifier1&amp;#39; (found in Parameter with Name &amp;#39;returnParameter&amp;#39;...(&lt;a href="http://technetsrilanka.net/blogs/danushkas/archive/2010/12/06/bdc-model-project-deployment-error-sharepoint-2010.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=691" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2010" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2010/default.aspx" /><category term="BDC" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/BDC/default.aspx" /></entry><entry><title>How to: Create an External Content type using SharePoint Designer 2010 (Business Connectivity Services)</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2010/08/19/how-to-create-an-external-content-type-using-sharepoint-designer-2010-business-connectivity-services.aspx" /><id>/blogs/danushkas/archive/2010/08/19/how-to-create-an-external-content-type-using-sharepoint-designer-2010-business-connectivity-services.aspx</id><published>2010-08-19T04:44:48Z</published><updated>2010-08-19T04:44:48Z</updated><content type="html">Here we are going to do a lab that creates an external content type using SharePoint 2010. Assume your company has a database with product details. You need to retrieve those details from the database and show them in the SharePoint site. Here you need to create, update and delete those records within SharePoint environment. So basically we are talking about creating CRUD methods for the external database inside the SharePoint UI. First I will breakdown entire process into few points where we can...(&lt;a href="http://technetsrilanka.net/blogs/danushkas/archive/2010/08/19/how-to-create-an-external-content-type-using-sharepoint-designer-2010-business-connectivity-services.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=663" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2010" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2010/default.aspx" /><category term="BDC" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/BDC/default.aspx" /><category term="SharePoint Designer 2010" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+Designer+2010/default.aspx" /></entry><entry><title>Error:”The form has been closed” – InfoPath 2007</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2010/08/16/error-the-form-has-been-closed-infopath-2007.aspx" /><id>/blogs/danushkas/archive/2010/08/16/error-the-form-has-been-closed-infopath-2007.aspx</id><published>2010-08-16T11:10:23Z</published><updated>2010-08-16T11:10:23Z</updated><content type="html">Here I got an error when I tried to attach custom InfoPath Initiation and Association forms to display in a SharePoint workflow. Depends on the IE session the error message differ. If you close the browser and reopened 2nd and 3rd error messages will appear. Anyway this error message appear because of the xml statement in the workflow.xml. If you check your workflow.xml you can see the form URNs are written like this &amp;lt; Association_FormURN &amp;gt; urn:schemas-microsoft-com:office:infopath:Test:-myXSD...(&lt;a href="http://technetsrilanka.net/blogs/danushkas/archive/2010/08/16/error-the-form-has-been-closed-infopath-2007.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=662" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2007/default.aspx" /><category term="InfoPath 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/InfoPath+2007/default.aspx" /><category term="Customization" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/Customization/default.aspx" /></entry><entry><title>Error: “Cannot access the local farm” – PowerShell command error</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2010/07/07/error-cannot-access-the-local-farm-powershell-command-error.aspx" /><id>/blogs/danushkas/archive/2010/07/07/error-cannot-access-the-local-farm-powershell-command-error.aspx</id><published>2010-07-07T04:40:13Z</published><updated>2010-07-07T04:40:13Z</updated><content type="html">When working with PowerShell I got an error. First I thought I am making some kind of a&amp;#160; mistake because I am new to this as well &amp;#160; So I was struggling to make it happen and finally figured it out. The solution was to have administrator privileges to run PowerShell. So when you want use PowerShell don’t just click on it. Right click and Run as Administrator Bingo! Now you can use it. Please add a comment if you use this code or it helped you. So I can make my posts better....(&lt;a href="http://technetsrilanka.net/blogs/danushkas/archive/2010/07/07/error-cannot-access-the-local-farm-powershell-command-error.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=650" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2010" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2010/default.aspx" /><category term="PowerShell" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/PowerShell/default.aspx" /></entry><entry><title>Error: “SQL server has an unsupported version” when installing SharePoint 2010</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2010/07/05/error-sql-server-has-an-unsupported-version-when-installing-sharepoint-2010.aspx" /><id>/blogs/danushkas/archive/2010/07/05/error-sql-server-has-an-unsupported-version-when-installing-sharepoint-2010.aspx</id><published>2010-07-05T04:06:59Z</published><updated>2010-07-05T04:06:59Z</updated><content type="html">&lt;p&gt;This error message came when I was installing SharePoint Server 2010. You might not get this error all the time so first I’ll explain my environment which I tried to install SharePoint 2010. My OS was Windows Server 2008 R2 Standard 64-bit (6.1, Build 7600) and SQL Server 2008 Standard x64. So I started with SQL server which was a smooth installation and then started the SharePoint Server 2010. The setup installation went smoothly. But when it comes to the SharePoint 2010 Products Configuration Wizard, it asked the database server and credentials. So I gave the same name and credentials which I installed before. Then the error came&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/SP2010Sql2008errorNew_5F00_6F38A55A.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SP2010-Sql2008 error New" border="0" alt="SP2010-Sql2008 error New" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/SP2010Sql2008errorNew_5F00_thumb_5F00_1238F0FE.jpg" width="244" height="201" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So I download the SQL Server 2008 Service Pack 1 and installed, restarted and tried again. Then I got the same error but the version number was different.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/SP2010Sql2008error2New_5F00_71457E56.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="SP2010-Sql2008 error2 New" border="0" alt="SP2010-Sql2008 error2 New" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/SP2010Sql2008error2New_5F00_thumb_5F00_2047BA2E.jpg" width="244" height="207" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Went through everything again and finally found the solution. It was to install the Cumulative update package 2 for SQL Server 2008 Service Pack 1 on SQL server 2008.&lt;/p&gt;  &lt;p&gt;Here are the links&lt;/p&gt;  &lt;p&gt;SQL Server 2008 Service Pack 1    &lt;br /&gt;&lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=66ab3dbb-bf3e-4f46-9559-ccc6a4f9dc19&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=66ab3dbb-bf3e-4f46-9559-ccc6a4f9dc19&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=66ab3dbb-bf3e-4f46-9559-ccc6a4f9dc19&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Cumulative update package 2 for SQL Server 2008 Service Pack 1    &lt;br /&gt;&lt;a title="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=970315&amp;amp;kbln=en-us" href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=970315&amp;amp;kbln=en-us"&gt;http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=970315&amp;amp;kbln=en-us&lt;/a&gt;&lt;/p&gt;  &lt;hr /&gt;  &lt;p style="text-align:center;color:#999999;"&gt;Please add a comment if you use this code or it helped you. So I can make my posts better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=649" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2010" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2010/default.aspx" /><category term="SQL Server 2008" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SQL+Server+2008/default.aspx" /></entry><entry><title>Calculate business days (weekdays) for a given two days using OOTB calculated field.</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2010/06/30/calculate-business-days-week-days-for-a-given-two-days-using-ootb-calculated-field.aspx" /><id>/blogs/danushkas/archive/2010/06/30/calculate-business-days-week-days-for-a-given-two-days-using-ootb-calculated-field.aspx</id><published>2010-06-30T12:03:00Z</published><updated>2010-06-30T12:03:00Z</updated><content type="html">&lt;p&gt;Recently I needed to calculate business days for a given start and end days. But I needed to do this using OOTB calculated field. This formula has to remove Saturdays and Sundays (Weekends) from the given start and end dates. Here I check if dates are inserted. If not I return an empty string. I was struggling with functions in calculated fields and I was not allowed to use SharePoint object model. I tried so many ways and finally came up with the correct formula. I need to thank Sujeewa, who helped me out with the formula. Here is the formula. Happy coding &lt;img alt="smile_wink" src="http://spaces.live.com/rte/emoticons/smile_wink.gif" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;=IF(ISERROR(DATEDIF(StartDate,EndDate,&amp;quot;d&amp;quot;)),&amp;quot;&amp;quot;,(DATEDIF(StartDate,EndDate,&amp;quot;d&amp;quot;))+1      &lt;br /&gt;-INT(DATEDIF(StartDate,EndDate,&amp;quot;d&amp;quot;)/7)*2       &lt;br /&gt;-IF((WEEKDAY(EndDate)-WEEKDAY(StartDate))&amp;lt;0,2,0)       &lt;br /&gt;-IF(OR(AND(WEEKDAY(EndDate)=7,WEEKDAY(StartDate)=7),AND(WEEKDAY(EndDate)=1,WEEKDAY(StartDate)=1)),1,0)       &lt;br /&gt;-IF(AND(WEEKDAY(StartDate)=1,(WEEKDAY(EndDate)-WEEKDAY(StartDate))&amp;gt;0),1,0)       &lt;br /&gt;-IF(AND(NOT(WEEKDAY(StartDate)=7),WEEKDAY(EndDate)=7),1,0))&lt;/span&gt; &lt;/p&gt;
&lt;hr /&gt;
&lt;p style="text-align:center;color:#999999;"&gt;Please add a comment if you use this code or it helped you. So I can make my posts better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=646" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2007/default.aspx" /><category term="Customization" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/Customization/default.aspx" /></entry><entry><title>Dropdown get to editable mode when more than 19 records in lookup fields</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2010/06/21/dropdown-gets-to-editable-mode-when-more-than-19-records-in-lookup-fields.aspx" /><id>/blogs/danushkas/archive/2010/06/21/dropdown-gets-to-editable-mode-when-more-than-19-records-in-lookup-fields.aspx</id><published>2010-06-21T05:31:00Z</published><updated>2010-06-21T05:31:00Z</updated><content type="html">&lt;p&gt;When you create a lookup field to reference data from another list, you will get a dropdown control to select data from that list. If you select &amp;ldquo;Allow multiple values&amp;rdquo; you will get a list box control with two buttons which you can select values. But have you ever seen an editable dropdown OOTB in SharePoint? I don&amp;rsquo;t think so. If you need to add an editable dropdown then you have to come up with your own custom control.&lt;/p&gt;
&lt;p&gt;When you add more than 19 records to the lookup list, SharePoint automatically makes that dropdown list editable. This is because when you have lots of items in the dropdown, It&amp;rsquo;s very difficult to find an appropriate item. So SharePoint allows you to type in the dropdown and it&amp;rsquo;s automatically sorted. This is not a bug. This is a feature in SharePoint.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see some screenshots.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_164913_5F00_178B46AD.jpg"&gt;&lt;img src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_164913_5F00_thumb_5F00_6DC7CBB9.jpg" alt="2010-06-18_164913" title="2010-06-18_164913" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" height="73" width="140" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;OK&amp;hellip; I have two lists. &amp;ldquo;My Favorite Colours&amp;rdquo; has a lookup field to &amp;ldquo;My Colours&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_165801_5F00_04A69D36.jpg"&gt;&lt;img src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_165801_5F00_thumb_5F00_69219B32.jpg" alt="2010-06-18_165801" title="2010-06-18_165801" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" height="244" width="164" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;ldquo;My Colours&amp;rdquo; has some colours in the list.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_165902_5F00_2DEDBF67.jpg"&gt;&lt;img src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_165902_5F00_thumb_5F00_24455131.jpg" alt="2010-06-18_165902" title="2010-06-18_165902" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" height="227" width="244" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Added the lookup field to &amp;ldquo;My Favorite Colours&amp;rdquo; list&lt;/p&gt;
&lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_165922_5F00_541FF2F2.jpg"&gt;&lt;img src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_165922_5F00_thumb_5F00_6DA7801F.jpg" alt="2010-06-18_165922" title="2010-06-18_165922" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" height="55" width="244" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;When &amp;ldquo;My Colours&amp;rdquo; has 19 records, &amp;ldquo;My Favorite Colours&amp;rdquo; list&amp;rsquo;s edit form shows usual dropdown box (Un editable)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_170647_5F00_7001021D.jpg"&gt;&lt;img src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_170647_5F00_thumb_5F00_5B2F099D.jpg" alt="2010-06-18_170647" title="2010-06-18_170647" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" height="88" width="244" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;But when we added more than 19 it&amp;rsquo;s automatically gets to editable. You can type and it&amp;rsquo;s automatically gets sorted according to the typed character.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_170822_5F00_206760C7.jpg"&gt;&lt;img src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/20100618_5F00_170822_5F00_thumb_5F00_08ECAC96.jpg" alt="2010-06-18_170822" title="2010-06-18_170822" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" height="66" width="244" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I know what you think now. Users can type any value and save to the list without checking the lookup values. Don&amp;rsquo;t worry SharePoint automatically checks the value and show an error message. &lt;/p&gt;
&lt;hr /&gt;
&lt;p style="text-align:center;color:#666666;"&gt;Please add a comment if you use this code or it helped you. So I can make my posts better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=642" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2007/default.aspx" /></entry><entry><title>SharePoint 2010 VM in 32 bit host machine</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2010/03/31/sharepoint-2010-vm-in-32-bits-host-machine.aspx" /><id>/blogs/danushkas/archive/2010/03/31/sharepoint-2010-vm-in-32-bits-host-machine.aspx</id><published>2010-03-30T22:12:06Z</published><updated>2010-03-30T22:12:06Z</updated><content type="html">&lt;p&gt;I was trying to install SharePoint 2010 VM in 32 bit machine last week and couldn’t do it. After hours of searching the web I found a solution for that. This is a very good article that explains how you can install SharePoint 2010 VM in 32 bit host machine. Since SharePoint 2010 only comes in 64x version it’s worth reading. Thanks for perete for publishing this article.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://comunidad.terra.es/blogs/moss/archive/2009/07/18/howtocreateasharepoint2010vmin32bitshostmachine1of5.aspx" href="http://comunidad.terra.es/blogs/moss/archive/2009/07/18/howtocreateasharepoint2010vmin32bitshostmachine1of5.aspx"&gt;http://comunidad.terra.es/blogs/moss/archive/2009/07/18/howtocreateasharepoint2010vmin32bitshostmachine1of5.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=607" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2010" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2010/default.aspx" /></entry><entry><title>SharePoint Server 2010 Beta</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2009/11/24/sharepoint-server-2010-beta.aspx" /><id>/blogs/danushkas/archive/2009/11/24/sharepoint-server-2010-beta.aspx</id><published>2009-11-24T08:28:26Z</published><updated>2009-11-24T08:28:26Z</updated><content type="html">&lt;p&gt;As you&amp;#39;re all waiting for SharePoint 2010, Now is the chance to taste it. &lt;a href="http://technet.microsoft.com/en-us/evalcenter/ee388573.aspx" target="_blank"&gt;Click here to download your SharePoint Server 2010 Beta version now&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=527" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2010" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2010/default.aspx" /></entry><entry><title>Custom Master pages on SharePoint</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2009/11/05/custom-master-pages-on-sharepoint.aspx" /><id>/blogs/danushkas/archive/2009/11/05/custom-master-pages-on-sharepoint.aspx</id><published>2009-11-05T05:35:04Z</published><updated>2009-11-05T05:35:04Z</updated><content type="html">&lt;p&gt;Few months ago I wanted to create a custom master page for a SharePoint portal and after some research I found a way of customizing master pages on SharePoint. But I couldn’t post a blog about it. Here I am attaching my custom master pages and I will update this as I develop it further in the future. I will explain the ways of customization soon.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="400" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/SpringnetMoss_5F00_06F0BC21.gif"&gt;&lt;img title="SpringnetMoss" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="158" alt="SpringnetMoss" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/SpringnetMoss_5F00_thumb_5F00_71068829.gif" width="244" border="0" /&gt;&lt;/a&gt; &lt;/td&gt;        &lt;td valign="top" width="200"&gt;Intranet for Spring Global Services on MOSS 2007&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/DilmahMoss_5F00_04C07FAB.gif"&gt;&lt;img title="DilmahMoss" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="148" alt="DilmahMoss" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/DilmahMoss_5F00_thumb_5F00_111E7D07.gif" width="244" border="0" /&gt;&lt;/a&gt; &lt;/td&gt;        &lt;td valign="top" width="200"&gt;Intranet for another customer on MOSS 2007&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/HostedWss_5F00_57E6EF92.jpg"&gt;&lt;img title="HostedWss" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="184" alt="HostedWss" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/HostedWss_5F00_thumb_5F00_55B9CAFC.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/td&gt;        &lt;td valign="top" width="200"&gt;Hosted WSS site on WSS 3.0&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=466" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2007/default.aspx" /><category term="Customization" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/Customization/default.aspx" /></entry><entry><title>Awesome SharePoint features in Visual Studio 2010</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2009/11/05/awesome-sharepoint-features-in-visual-studio-2010.aspx" /><id>/blogs/danushkas/archive/2009/11/05/awesome-sharepoint-features-in-visual-studio-2010.aspx</id><published>2009-11-05T02:51:54Z</published><updated>2009-11-05T02:51:54Z</updated><content type="html">&lt;p&gt;Few days ago MS has announced Visual Studio 2010. It contain many SharePoint project templates and grate features for SharePoint developers. Here is the short overview which Microsoft SharePoint Team Blog has given. &lt;a href="http://blogs.msdn.com/sharepoint/archive/2009/10/28/short-overview-of-sharepoint-features-in-visual-studio-2010.aspx" target="_blank"&gt;Read more at Microsoft SharePoint Team Blog.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;SharePoint Project and Project Item Templates&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The following SharePoint specific project templates and project item templates are available in Visual Studio 2010: &lt;/p&gt;  &lt;h6&gt;&lt;strong&gt;Project Templates&lt;/strong&gt;&lt;/h6&gt;  &lt;p&gt;· Empty SharePoint project    &lt;br /&gt;· Visual Web Part project     &lt;br /&gt;· Sequential and State Machine Workflow     &lt;br /&gt;· Business Data Connectivity Model     &lt;br /&gt;· Event Receiver     &lt;br /&gt;· List Definition     &lt;br /&gt;· Content Type     &lt;br /&gt;· Module Project     &lt;br /&gt;· Site Definition &lt;/p&gt;  &lt;h6&gt;&lt;strong&gt;Project Item Templates&lt;/strong&gt;&lt;/h6&gt;  &lt;p&gt;· Empty Element    &lt;br /&gt;· Web Part     &lt;br /&gt;· User Control     &lt;br /&gt;· Application Page     &lt;br /&gt;· Association Form     &lt;br /&gt;· Initiation Form     &lt;br /&gt;· Business Data Connectivity Resource Item     &lt;br /&gt;· List Instance     &lt;br /&gt;· List Definition From Content Type     &lt;br /&gt;· Global Resources File&lt;/p&gt;  &lt;p&gt;Besides above mentioned project templates, there are two import project templates for importing .WSP file contents and importing reusable workflows: &lt;/p&gt;  &lt;p&gt;· Import Reusable Workflow    &lt;br /&gt;· Import SharePoint Solution Package&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=463" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2007/default.aspx" /><category term="SharePoint 2010" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2010/default.aspx" /></entry><entry><title>World Clock web part – SharePoint 2007</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2009/09/16/world-clock-web-part-sharepoint-2007.aspx" /><id>/blogs/danushkas/archive/2009/09/16/world-clock-web-part-sharepoint-2007.aspx</id><published>2009-09-16T05:33:56Z</published><updated>2009-09-16T05:33:56Z</updated><content type="html">&lt;p&gt;This is a clock web part shows digital clocks depends on the user needs. Thanks to anujpant for sharing this at codeplex. You can find the original source and wsp file &lt;a href="http://sharepointworldclock.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=31048" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The original clock looks like this&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/Clock_5F00_Old_5F00_18AC1E17.gif"&gt;&lt;img title="Clock_Old" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="244" alt="Clock_Old" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/Clock_5F00_Old_5F00_thumb_5F00_365A30B1.gif" width="161" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Customized clock will looks like this&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/Clock_5F00_New_5F00_671C9C82.gif"&gt;&lt;img title="Clock_New" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="233" alt="Clock_New" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/Clock_5F00_New_5F00_thumb_5F00_7E475559.gif" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can download the customized &lt;a href="http://cid-18829c69f065aa97.skydrive.live.com/self.aspx/SharePoint%202007/ClockWebPart.rar" target="_blank"&gt;source code here&lt;/a&gt; what I edited for my requirement.&lt;/p&gt;  &lt;p&gt;I customized this with VS 2008. Here I wanted to display the city/country name beside the clock rather than displaying under the clock. So I added a new cell into the same row.&lt;/p&gt;  &lt;p&gt;Then I wanted to remove clock skins. The original clock can select 4 color skins as the user wants. After deploying the clock I realized that displaying seconds is disturbing the users. It’s worse when you added more than 5 clocks. So without removing the seconds I hid it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=326" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2007/default.aspx" /><category term="Customization" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/Customization/default.aspx" /></entry><entry><title>Currency Converter web part – SharePoint 2007</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2009/09/10/currency-converter-web-part-sharepoint-2007.aspx" /><id>/blogs/danushkas/archive/2009/09/10/currency-converter-web-part-sharepoint-2007.aspx</id><published>2009-09-10T06:22:26Z</published><updated>2009-09-10T06:22:26Z</updated><content type="html">&lt;p&gt;Recently one of our customers wanted a currency converter on their SharePoint site. This can be done developing a custom web part. I developed a web part using VS 2008. So I thought of publishing it with the source then anyone can download and modify it as they want.&lt;/p&gt;  &lt;p&gt;Here is what it looks like&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/ExSc1_5F00_5F2B4A65.gif"&gt;&lt;img title="ExSc1" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="158" alt="ExSc1" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/ExSc1_5F00_thumb_5F00_442EB2F2.gif" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can download the &lt;a href="http://cid-18829c69f065aa97.skydrive.live.com/self.aspx/SharePoint%202007/CurrConverter.rar?sa=868383992" target="_blank"&gt;source codes here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;First I want to thank Shalvin for the free &lt;a href="http://shalvinpd.blogspot.com/2008/11/currency-conversion-web-service-with.html" target="_blank"&gt;currency converter web service&lt;/a&gt;. Here he has explained how we can use the web service in SharePoint. Now I am going to explain my web part with some screenshots.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Now open your VS2008 and create a new project using Web Part template.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/ExSc2_5F00_2F4C94A5.gif"&gt;&lt;img title="ExSc2" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="167" alt="ExSc2" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/ExSc2_5F00_thumb_5F00_215A0310.gif" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We start adding the web service to our project. Right click you project in the solution explorer and click on &lt;strong&gt;Add Web Reference.&lt;/strong&gt; Type our web service URL in the &lt;strong&gt;URL&lt;/strong&gt; box and click &lt;strong&gt;Go&lt;/strong&gt;. If you want you can change the &lt;strong&gt;Web Reference Name&lt;/strong&gt; and click &lt;strong&gt;Add Reference.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/ExSc3_5F00_50B84C0F.gif"&gt;&lt;img title="ExSc3" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="154" alt="ExSc3" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/ExSc3_5F00_thumb_5F00_66FA792F.gif" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Open your .cs file and define some variables and controls.&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="code"&gt;CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;CurrencyConvertor &lt;/span&gt;cc = &lt;span style="color:blue;"&gt;new &lt;/span&gt;CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;CurrencyConvertor&lt;/span&gt;();
&lt;span style="color:blue;"&gt;double &lt;/span&gt;dblConv;
&lt;span style="color:blue;"&gt;double &lt;/span&gt;dblAmt;
&lt;span style="color:#2b91af;"&gt;DropDownList &lt;/span&gt;lstEndCurr;
&lt;span style="color:#2b91af;"&gt;DropDownList &lt;/span&gt;lstStartCurr;
&lt;span style="color:#2b91af;"&gt;Button &lt;/span&gt;btnSend;
&lt;span style="color:#2b91af;"&gt;Label &lt;/span&gt;lblConversion;
&lt;span style="color:#2b91af;"&gt;TextBox &lt;/span&gt;txtAmount;
&lt;span style="color:#2b91af;"&gt;Label &lt;/span&gt;lblConvert;
&lt;span style="color:#2b91af;"&gt;Label &lt;/span&gt;lblInto;
&lt;span style="color:#2b91af;"&gt;Label &lt;/span&gt;lblAmount;
&lt;span style="color:#2b91af;"&gt;Label &lt;/span&gt;lblDetails;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Make sure you have “WebControls” namespace in your class&lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;System.Web.UI.WebControls;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;We are going to have two DropDownList controls for “From” and “To” fields. So we need to fill them with currency codes with description. So here I have wrote a function for that which will return a HashTable and you can directly bind that to the DropDownList. Here if you want you can directly call method from the web service and fill the DropDoenList.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;private &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Hashtable &lt;/span&gt;setDDL()
{
&lt;span style="color:#2b91af;"&gt;&lt;font color="#000000"&gt;    &lt;/font&gt;Hashtable &lt;/span&gt;hTable = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Hashtable&lt;/span&gt;();
    hTable.Add(&lt;span style="color:#a31515;"&gt;&amp;quot;AFA&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;AFA-Afghanistan Afghani&amp;quot;&lt;/span&gt;);
    hTable.Add(&lt;span style="color:#a31515;"&gt;&amp;quot;ALL&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;ALL-Albanian Lek&amp;quot;&lt;/span&gt;);
    hTable.Add(&lt;span style="color:#a31515;"&gt;&amp;quot;DZD&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;DZD-Algerian Dinar&amp;quot;&lt;/span&gt;);

    &lt;span style="color:blue;"&gt;return &lt;/span&gt;hTable;
}&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then we need to add our controls to a collection. So we can call them when we render the page. So here we use enumeration type.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;private enum &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;WebPartControls&lt;br /&gt;&lt;/span&gt;{
    lblAmount,
    txtAmount,
    lblConvert,
    lstStartCurr,
    lblInto,
    lstEndCurr,
    btnSend,
    lblConversion,
    lblDetails
}&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now you can add code for all your controls to the “CreateChildControls” method. Here I haven’t add all my codes in this post. &lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;protected override void &lt;/span&gt;CreateChildControls()
{
&lt;span style="color:green;"&gt;    //Set properties for Amount label
    &lt;/span&gt;lblAmount = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Label&lt;/span&gt;();
    lblAmount.Text = &lt;span style="color:#a31515;"&gt;&amp;quot;Amount :&amp;quot;&lt;/span&gt;;
    lblAmount.Width = 60;
    &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Controls.Add(lblAmount);

    &lt;span style="color:green;"&gt;//Set properties for Amount textbox
    &lt;/span&gt;txtAmount = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;TextBox&lt;/span&gt;();
    txtAmount.Width = 100;
    &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Controls.Add(txtAmount);

&lt;span style="color:green;"&gt;    //Set properties and items for from DropDownList
    &lt;/span&gt;lstStartCurr = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;DropDownList&lt;/span&gt;();
    &lt;span style="color:green;"&gt;//Define a Hashtable and set the return Hashtable from setDDL function
    &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Hashtable &lt;/span&gt;hTableStart = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Hashtable&lt;/span&gt;();
    hTableStart = setDDL();
    lstStartCurr = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;DropDownList&lt;/span&gt;();
    lstStartCurr.DataSource = hTableStart;
    lstStartCurr.DataTextField = &lt;span style="color:#a31515;"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;;
    lstStartCurr.DataValueField = &lt;span style="color:#a31515;"&gt;&amp;quot;Key&amp;quot;&lt;/span&gt;;
    lstStartCurr.DataBind();
    &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Controls.Add(lstStartCurr);

    &lt;span style="color:green;"&gt;//Set properties and event for convert button
    &lt;/span&gt;btnSend = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Button&lt;/span&gt;();
    btnSend.Click += &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;EventHandler&lt;/span&gt;(btnSend_Click); 
    btnSend.Text = &lt;span style="color:#a31515;"&gt;&amp;quot;Convert&amp;quot;&lt;/span&gt;;
    btnSend.Width = 75;
    &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Controls.Add(btnSend);

    ChildControlsCreated = &lt;span style="color:blue;"&gt;true&lt;/span&gt;;
}&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Next we can start writing the event for our convert button&lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;void &lt;/span&gt;btnSend_Click(&lt;span style="color:blue;"&gt;object &lt;/span&gt;sender, &lt;span style="color:#2b91af;"&gt;EventArgs &lt;/span&gt;e)
{&lt;br /&gt;     &lt;span style="color:green;"&gt;//Creat two object from the currency web service&lt;br /&gt;&lt;/span&gt;     CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;Currency &lt;/span&gt;fromCurrency = &lt;span style="color:blue;"&gt;new &lt;/span&gt;CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;Currency&lt;/span&gt;();
     CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;Currency &lt;/span&gt;toCurrency = &lt;span style="color:blue;"&gt;new &lt;/span&gt;CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;Currency&lt;/span&gt;();&lt;br /&gt;&lt;span style="color:green;"&gt;     //Convert selected items from DropDownLists into currency objects&lt;br /&gt;&lt;/span&gt;     fromCurrency = (CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;Currency&lt;/span&gt;)&lt;span style="color:#2b91af;"&gt;Enum&lt;/span&gt;.Parse(&lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;Currency&lt;/span&gt;), &lt;br /&gt;&lt;span style="color:blue;"&gt;this&lt;/span&gt;.lstStartCurr.SelectedValue.ToString());
     toCurrency = (CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;Currency&lt;/span&gt;)&lt;span style="color:#2b91af;"&gt;Enum&lt;/span&gt;.Parse(&lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(CurrencyConvertor.&lt;span style="color:#2b91af;"&gt;Currency&lt;/span&gt;), &lt;br /&gt;&lt;span style="color:blue;"&gt;this&lt;/span&gt;.lstEndCurr.SelectedValue.ToString());
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
     &lt;span style="color:green;"&gt;//Pass our from and to currency codes to web service and get the return value to a variable &lt;/span&gt;&lt;br /&gt;     dblConv = cc.ConversionRate(fromCurrency, toCurrency);
     lblConversion = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Label&lt;/span&gt;();
     dblAmt = &lt;span style="color:#2b91af;"&gt;Double&lt;/span&gt;.Parse(txtAmount.Text.ToString()) * dblConv;
     lblConversion.Text = dblAmt.ToString();
     &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Controls.Add(lblConversion);&lt;br /&gt;&lt;span style="color:green;"&gt;     //Set the value for Details label with the return values &lt;/span&gt;
     lblDetails = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Label&lt;/span&gt;();
     lblDetails.Text = &lt;span style="color:#a31515;"&gt;&amp;quot;1.00 &amp;quot; &lt;/span&gt;+ lstStartCurr.SelectedValue.ToString() + &lt;span style="color:#a31515;"&gt;&amp;quot; = &amp;quot; &lt;/span&gt;+ dblConv.ToString() &lt;br /&gt;+ &lt;span style="color:#a31515;"&gt;&amp;quot; &amp;quot; &lt;/span&gt;+ lstEndCurr.SelectedValue.ToString();
     lblDetails.Style[&lt;span style="color:#a31515;"&gt;&amp;quot;text-align&amp;quot;&lt;/span&gt;] = &lt;span style="color:#a31515;"&gt;&amp;quot;center&amp;quot;&lt;/span&gt;;
     &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Controls.Add(lblDetails);
}&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;Next we can start out render method. This is the method which will create UI in our web part. We can insert html break tags between controls to have space in-between.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;protected override void &lt;/span&gt;Render(&lt;span style="color:#2b91af;"&gt;HtmlTextWriter &lt;/span&gt;writer)
{
&lt;span style="color:blue;"&gt;     try
     &lt;/span&gt;{
          Controls[(&lt;span style="color:blue;"&gt;int&lt;/span&gt;)&lt;span style="color:#2b91af;"&gt;WebPartControls&lt;/span&gt;.lblAmount].RenderControl(writer);
          Controls[(&lt;span style="color:blue;"&gt;int&lt;/span&gt;)&lt;span style="color:#2b91af;"&gt;WebPartControls&lt;/span&gt;.txtAmount].RenderControl(writer);
          writer.Write(&lt;span style="color:#a31515;"&gt;&amp;quot;&amp;lt;BR&amp;gt;&amp;quot;&lt;/span&gt;);
          writer.Write(&lt;span style="color:#a31515;"&gt;&amp;quot;&amp;lt;BR&amp;gt;&amp;quot;&lt;/span&gt;);

&lt;span style="color:blue;"&gt;          if &lt;/span&gt;(Controls.Count == 9)
          {
               Controls[(&lt;span style="color:blue;"&gt;int&lt;/span&gt;)&lt;span style="color:#2b91af;"&gt;WebPartControls&lt;/span&gt;.lblDetails].RenderControl(writer);
          }
     }
     &lt;span style="color:blue;"&gt;catch&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;Exception &lt;/span&gt;ex)
     {
}&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we are done all coding things. Select your project and go to properties. It will open the project property window. Click on &lt;strong&gt;Debug&lt;/strong&gt; and click on &lt;strong&gt;Start browser with URL&lt;/strong&gt;. Type your site URL in the text box.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/ExSc4_5F00_70CF44CD.gif"&gt;&lt;img title="ExSc4" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="154" alt="ExSc4" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/ExSc4_5F00_thumb_5F00_00DAC12D.gif" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Now go to &lt;strong&gt;Build&lt;/strong&gt; menu and select &lt;strong&gt;Deploy Solution&lt;/strong&gt;. Visual studio will create our web part and deploy it into the SharePoint site.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=314" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2007/default.aspx" /><category term="Customization" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/Customization/default.aspx" /></entry><entry><title>Session on Business Data Catalog with SharePoint 2007</title><link rel="alternate" type="text/html" href="/blogs/danushkas/archive/2009/09/09/session-on-business-data-catalog-with-sharepoint-2007.aspx" /><id>/blogs/danushkas/archive/2009/09/09/session-on-business-data-catalog-with-sharepoint-2007.aspx</id><published>2009-09-09T10:56:28Z</published><updated>2009-09-09T10:56:28Z</updated><content type="html">&lt;p&gt;Recently I did a session at ITPro forum about Business Data Catalog with SharePoint 2007. Here I wanted to focus all our techies that how we are able to connect LOB systems to SharePoint 2007 using BDC and no coding solutions with LOB systems on SharePoint 2007.&lt;/p&gt;  &lt;p&gt;Below the agenda of my session.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Introduction to Business Data Catalog &lt;/li&gt;    &lt;li&gt;Why you need BDC? &lt;/li&gt;    &lt;li&gt;Live Demo with Simple BDC Application &lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p align="left"&gt;&amp;#160;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/BDC1_5F00_78DEA8A7.gif"&gt;&lt;img title="BDC1" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="133" alt="BDC1" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/BDC1_5F00_thumb_5F00_5E4E4429.gif" width="244" border="0" /&gt;&lt;/a&gt;       &lt;br /&gt;Screenshot of simple BDC application&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;li&gt;Live Demo on Configuring Search with BDC Application &lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;#160;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/BDC2_5F00_4F60FF35.gif"&gt;&lt;img title="BDC2" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="132" alt="BDC2" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/BDC2_5F00_thumb_5F00_123C8209.gif" width="244" border="0" /&gt;&lt;/a&gt;       &lt;br /&gt;Screenshot of search results&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;li&gt;Live Demo on Configuring InfoPath from with BDC Application &lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;#160;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/BDC3_5F00_57D0E65A.gif"&gt;&lt;img title="BDC3" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="151" alt="BDC3" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/BDC3_5F00_thumb_5F00_7CAE5B39.gif" width="244" border="0" /&gt;&lt;/a&gt;       &lt;br /&gt;Screenshot of Selected record value passed to a from&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;li&gt;Q&amp;amp;A &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Those who are couldn’t attend to this session can download the files here.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://cid-18829c69f065aa97.skydrive.live.com/self.aspx/BDC%20Session/BDC.ppsx" target="_blank"&gt;Presentation (ppt)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://cid-18829c69f065aa97.skydrive.live.com/self.aspx/BDC%20Session/Northwind.xml" target="_blank"&gt;Application definition (xml)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://cid-18829c69f065aa97.skydrive.live.com/self.aspx/BDC%20Session/Product.xsn" target="_blank"&gt;InfoPath form (xsn)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.microsoft.com/Downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&amp;amp;displaylang=en" target="_blank"&gt;Northwind database&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Some memories from the session &lt;/p&gt; &lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/DSC03710_5F00_3FE566F7.jpg"&gt;&lt;img title="DSC03710" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="184" alt="DSC03710" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/DSC03710_5F00_thumb_5F00_3021BDF4.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/DSC03714_5F00_648244A2.jpg"&gt;&lt;img title="DSC03714" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="184" alt="DSC03714" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/DSC03714_5F00_thumb_5F00_79AC364B.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;a href="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/DSC03715_5F00_3A2E3721.jpg"&gt;&lt;img title="DSC03715" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="184" alt="DSC03715" src="http://technetsrilanka.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/danushkas/DSC03715_5F00_thumb_5F00_7501F1C5.jpg" width="244" border="0" /&gt;&lt;/a&gt;   &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Date&amp;#160;&amp;#160;&amp;#160; : 26th August 2009    &lt;br /&gt;Time&amp;#160;&amp;#160;&amp;#160; : 6 PM onwards     &lt;br /&gt;Venue&amp;#160;&amp;#160; : Microsoft Sri Lanka Auditorium &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://technetsrilanka.net/aggbug.aspx?PostID=310" width="1" height="1"&gt;</content><author><name>danushkas</name><uri>http://technetsrilanka.net/members/danushkas/default.aspx</uri></author><category term="SharePoint 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/SharePoint+2007/default.aspx" /><category term="InfoPath 2007" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/InfoPath+2007/default.aspx" /><category term="BDC" scheme="http://technetsrilanka.net/blogs/danushkas/archive/tags/BDC/default.aspx" /></entry></feed>
