<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Gino Abraham's Blog</title>
        <link>http://geekswithblogs.net/GinoAbraham/Default.aspx</link>
        <description />
        <language>en-US</language>
        <copyright>Gino Abraham</copyright>
        <managingEditor>abraham.gino@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Gino Abraham's Blog</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/GinoAbraham/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Attempted to perform an unauthorized operation – Error while updating other user’s profile data in Sharepoint 2010 </title>
            <category>Sharepoint 2010</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/12/14/attempted-to-perform-an-unauthorized-operation--error-while-updating.aspx</link>
            <description>
		&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;
				&lt;font face="Arial"&gt;We had a requirement where a user profile property will be updated from the event receiver of a custom list. The user profile property which we can had “user can override” and “Allow users to edit”, however we were getting an error “Attempted to perform an unauthorized operation”&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /???&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;
		&lt;/p&gt;
		&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;
				&lt;font face="Arial"&gt;The code was running under RunWithElevated delegate. We traced the user id which was Sharepoint\System. The system account in use will be the App pool Identity under which the current Sharepoint site is running. We took app pool identity id and gave full permission for user profile service application. This didn’t solve our problem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;
		&lt;/p&gt;
		&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;
				&lt;font face="Arial"&gt;Solution:&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;
		&lt;/p&gt;
		&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;
				&lt;font face="Arial"&gt;Get the App pool identity, of the Sharepoint site from IIS.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;
		&lt;/p&gt;
		&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;
				&lt;font face="Arial"&gt;Go to Sharepoint Central Admin &amp;gt; Application Management &amp;gt; Manage Service Application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;
		&lt;/p&gt;
		&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;
				&lt;font face="Arial"&gt;Select the User Profile Service Application which is associated to your site, and select Manage Permission from top ribbon. Add the App Pool Id and give full control. &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;
		&lt;/p&gt;
		&lt;p style="MARGIN: 0in 0in 10pt" class="MsoNormal"&gt;
				&lt;font face="Arial"&gt;Then select Administrators in the TOP ribbon for User Profile service application and add the app pool identity id and give full control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;
		&lt;/p&gt;
		&lt;p&gt; &lt;/p&gt;
 &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/148042.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/12/14/attempted-to-perform-an-unauthorized-operation--error-while-updating.aspx</guid>
            <pubDate>Wed, 14 Dec 2011 10:35:46 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GinoAbraham/comments/148042.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/12/14/attempted-to-perform-an-unauthorized-operation--error-while-updating.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/148042.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Block Application pages and Form Pages in Sharepoint 2010 </title>
            <category>Sharepoint 2010</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/11/03/block-application-pages-and-form-pages-in-sharepoint-2010.aspx</link>
            <description>&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'"&gt;By default Sharepoint doesn’t blocks user with limited access from visiting application pages (for ex _layouts/viewlsts.aspx).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'"&gt;Someone who knows the URL, can go to this page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'"&gt; We can avoid this by change the limited access to lockdown mode. Use the command below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span lang="EN" style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN"&gt;  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;&lt;table class="MsoNormalTable" border="1" cellspacing="1" cellpadding="0" width="522" style="border-bottom: #dddddd 1pt outset; border-left: #dddddd 1pt outset; width: 391.4pt; border-top: #dddddd 1pt outset; border-right: #dddddd 1pt outset; mso-cellspacing: .7pt; mso-border-alt: outset #DDDDDD .75pt; mso-yfti-tbllook: 1184"&gt;
    &lt;tbody&gt;
        &lt;tr style="height: 12.55pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes"&gt;
            &lt;td valign="bottom" width="26%" style="border-bottom: #dddddd 1pt inset; border-left: #dddddd 1pt inset; padding-bottom: 0.75pt; padding-left: 0.75pt; width: 26.84%; padding-right: 0.75pt; background: #cccccc; height: 12.55pt; border-top: #dddddd 1pt inset; border-right: #dddddd 1pt inset; padding-top: 0.75pt; mso-border-alt: inset #DDDDDD .75pt"&gt;
            &lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;b&gt;&lt;span lang="EN" style="font-family: 'Verdana','sans-serif'; color: #000066; font-size: 7.5pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-font-family: Arial"&gt;Action&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
            &lt;/td&gt;
            &lt;td valign="bottom" width="72%" style="border-bottom: #dddddd 1pt inset; border-left: #dddddd 1pt inset; padding-bottom: 0.75pt; padding-left: 0.75pt; width: 72.62%; padding-right: 0.75pt; background: #cccccc; height: 12.55pt; border-top: #dddddd 1pt inset; border-right: #dddddd 1pt inset; padding-top: 0.75pt; mso-border-alt: inset #DDDDDD .75pt"&gt;
            &lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;b&gt;&lt;span lang="EN" style="font-family: 'Verdana','sans-serif'; color: #000066; font-size: 7.5pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-font-family: Arial"&gt;Command&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr style="height: 24.4pt; mso-yfti-irow: 1"&gt;
            &lt;td valign="top" width="26%" style="border-bottom: #dddddd 1pt inset; border-left: #dddddd 1pt inset; padding-bottom: 0.75pt; padding-left: 0.75pt; width: 26.84%; padding-right: 0.75pt; background: white; height: 24.4pt; border-top: #dddddd 1pt inset; border-right: #dddddd 1pt inset; padding-top: 0.75pt; mso-border-alt: inset #DDDDDD .75pt"&gt;
            &lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span lang="EN" style="font-family: 'Verdana','sans-serif'; font-size: 7.5pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-font-family: Arial"&gt;Turn on lockdown mode for a site collection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
            &lt;td valign="top" width="72%" style="border-bottom: #dddddd 1pt inset; border-left: #dddddd 1pt inset; padding-bottom: 0.75pt; padding-left: 0.75pt; width: 72.62%; padding-right: 0.75pt; background: white; height: 24.4pt; border-top: #dddddd 1pt inset; border-right: #dddddd 1pt inset; padding-top: 0.75pt; mso-border-alt: inset #DDDDDD .75pt"&gt;
            &lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;b&gt;&lt;span lang="EN" style="font-family: 'Verdana','sans-serif'; font-size: 7.5pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-font-family: Arial"&gt;stsadm -o activatefeature -url &amp;lt;site collection url&amp;gt; -filename ViewFormPagesLockDown\feature.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr style="height: 23.7pt; mso-yfti-irow: 2; mso-yfti-lastrow: yes"&gt;
            &lt;td valign="top" width="26%" style="border-bottom: #dddddd 1pt inset; border-left: #dddddd 1pt inset; padding-bottom: 0.75pt; padding-left: 0.75pt; width: 26.84%; padding-right: 0.75pt; background: white; height: 23.7pt; border-top: #dddddd 1pt inset; border-right: #dddddd 1pt inset; padding-top: 0.75pt; mso-border-alt: inset #DDDDDD .75pt"&gt;
            &lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span lang="EN" style="font-family: 'Verdana','sans-serif'; font-size: 7.5pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-font-family: Arial"&gt;Turn off lockdown mode for a site collection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
            &lt;td valign="top" width="72%" style="border-bottom: #dddddd 1pt inset; border-left: #dddddd 1pt inset; padding-bottom: 0.75pt; padding-left: 0.75pt; width: 72.62%; padding-right: 0.75pt; background: white; height: 23.7pt; border-top: #dddddd 1pt inset; border-right: #dddddd 1pt inset; padding-top: 0.75pt; mso-border-alt: inset #DDDDDD .75pt"&gt;
            &lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;b&gt;&lt;span lang="EN" style="font-family: 'Verdana','sans-serif'; font-size: 7.5pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-font-family: Arial"&gt;stsadm -o deactivatefeature -url &amp;lt;site collection url&amp;gt; -filename ViewFormPagesLockDown\feature.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;

&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt"&gt;&lt;font face="Calibri"&gt;&lt;span style="font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;For more info on this visit &lt;/span&gt;&lt;span style="font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc263468(office.12).aspx"&gt;&lt;span lang="EN" style="color: blue; font-size: 10pt; mso-ansi-language: EN"&gt;http://technet.microsoft.com/en-us/library/cc263468(office.12).aspx#section6&lt;/span&gt;&lt;span style="display: none; color: blue; mso-hide: all"&gt; &lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;span style="display: none; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-hide: all"&gt; &lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'"&gt;Once locked down mode is enabled, groups/users with &lt;span style="mso-bidi-font-weight: bold"&gt;View Application pages &lt;/span&gt;will only be able to visit these pages. You can either select &lt;span style="mso-bidi-font-weight: bold"&gt;Restricted Read&lt;/span&gt; permission or remove &lt;span style="mso-bidi-font-weight: bold"&gt;View Application Pages&lt;/span&gt; permission for the users or groups which you want to block application pages.&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/147536.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/11/03/block-application-pages-and-form-pages-in-sharepoint-2010.aspx</guid>
            <pubDate>Thu, 03 Nov 2011 08:26:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GinoAbraham/comments/147536.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/11/03/block-application-pages-and-form-pages-in-sharepoint-2010.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/147536.aspx</wfw:commentRss>
        </item>
        <item>
            <title>ULS Tracelog To WSS_Logging Database in Sharepoint 2010</title>
            <category>Sharepoint 2010</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/07/05/making-uls-tracelog-to-be-move-to-wss_logging-database.aspx</link>
            <description>&lt;p&gt;By Default ULS trace logs are logged to text file in 14 Hive\LOGS. In sharepoint 2010 we have a provision to move these logs to WSS_Logging database.  Follow these steps to get ULS tracelogs to WSS_Logging Database.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ol type="1"&gt;
    &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
    &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Arial"&gt;&lt;span lang="EN" style="mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;Open the SharePoint Central Administration site&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
    &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Arial"&gt;&lt;span lang="EN" style="mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;Navigate to the Monitoring section&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
    &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Arial"&gt;&lt;span lang="EN" style="mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;Select Review Job Definitions&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
    &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Arial"&gt;&lt;span lang="EN" style="mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;Click on the job with the name Diagnostic Data Provider: Trace Log&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
    &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Arial"&gt;&lt;span lang="EN" style="mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;Click on the Enable button to enable it&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;
    &lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Arial"&gt;&lt;span lang="EN" style="mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;Click on Run Now, to start it immediately&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-bidi-language: TA"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
    &lt;p&gt;&lt;span style="font-size: small"&gt; &lt;/span&gt;&lt;/p&gt;
    &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/146080.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/07/05/making-uls-tracelog-to-be-move-to-wss_logging-database.aspx</guid>
            <pubDate>Tue, 05 Jul 2011 06:02:20 GMT</pubDate>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/07/05/making-uls-tracelog-to-be-move-to-wss_logging-database.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/146080.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Add Team Site Under Publishing Site as a Subsite</title>
            <category>Sharepoint 2010</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/05/20/add-team-site-under-publishing-site-as-a-subsite.aspx</link>
            <description>&lt;p&gt;By default when you try create a subsite under a Publishing site with will give you only 2 options. (Publishing Site or Enterprise Wiki).&lt;/p&gt;
&lt;p&gt;But we can enable as many site templates as we want. Go to Site Actions &amp;gt; Site Settings &amp;gt; Look And Feel &amp;gt; Page Layout and Site template.&lt;/p&gt;
&lt;p&gt;Select the list of templates you want.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/145459.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/05/20/add-team-site-under-publishing-site-as-a-subsite.aspx</guid>
            <pubDate>Fri, 20 May 2011 13:17:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GinoAbraham/comments/145459.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/05/20/add-team-site-under-publishing-site-as-a-subsite.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/145459.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Accessing Interop dlls makes winforms exes non responsive</title>
            <category>General Dotnet Tips</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/04/25/accessing-interop-dlls-makes-winforms-exes-non-responsive.aspx</link>
            <description>&lt;p&gt;In one of my windows application, I was making use of Domino inerop for accessing document data from lotus notes. Whenever the interop was probed for some bigger response, my application use to be non responsive or hang.Once the call to inerop is done the application was accessible. Users will not know the progress in such scenarios.&lt;/p&gt;
&lt;p&gt;You can avoid this by introducing a Background thead. Move all the inerop method calls to a seperate function. On you event handler add a background thread and call the function.&lt;/p&gt;
&lt;table border="1" cellspacing="1" cellpadding="1" width="90%" align="center"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;
            &lt;div&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Thread&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; newThread = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Thread&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;(FunctionWithInteropCalls);&lt;/font&gt;
            &lt;p&gt;newThread.IsBackground = &lt;font color="#0000ff"&gt;true&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt;
            &lt;/font&gt;&lt;/div&gt;
            &lt;div&gt;newThread.Start();&lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If the thread is marked as a Background thread, the thread will be killed automatically during Application.Exit()&lt;/p&gt;
&lt;p&gt;Now if function which is executed by newThread should access windows objects created in the main thread, you will have to handle it. Sample below shown how you can achieve this.&lt;/p&gt;
&lt;table border="1" cellspacing="1" cellpadding="1" width="90%" align="center"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
            &lt;div&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="color: blue; font-size: 10pt"&gt;public void&lt;/span&gt;&lt;span style="color: black; font-size: 10pt"&gt; AccessMainThreadObj(&lt;/span&gt;&lt;span style="color: blue; font-size: 10pt"&gt;string&lt;/span&gt;&lt;span style="color: black; font-size: 10pt"&gt; value)&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="color: black; font-size: 10pt"&gt;{&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="font-size: 10pt"&gt;if (&lt;span style="color: black"&gt;InvokeRequired&lt;/span&gt;) &lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="color: black; font-size: 10pt"&gt;{&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal; text-indent: 0.5in"&gt;&lt;span style="color: blue; font-size: 10pt"&gt;this&lt;/span&gt;&lt;span style="font-size: 10pt"&gt;.Invoke(&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;span style="color: #2b91af"&gt;Action&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;(AccessMainThreadObj), value);  &lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal; text-indent: 0.5in"&gt;&lt;span style="font-size: 10pt"&gt;return;&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="font-size: 10pt"&gt;}&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="color: blue; font-size: 10pt"&gt;if&lt;/span&gt;&lt;span style="font-size: 10pt"&gt;(value.StartsWith("#1"))&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="font-size: 10pt"&gt;    textbox1.Text = value.Substring(2);&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="color: blue; font-size: 10pt"&gt;else&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="font-size: 10pt"&gt;   richTextBox2.Text += value;&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="font-size: 10pt"&gt;}&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="font-size: 10pt"&gt;  &lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt; &lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="color: blue; font-size: 10pt"&gt;void&lt;/span&gt;&lt;span style="font-size: 10pt"&gt; FunctionWithInteropCalls()&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="font-size: 10pt"&gt;{&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="font-size: 10pt"&gt;AccessMainThreadObj("#1 To update textbox1");&lt;br /&gt;
            AccessMainThreadObj("To update richTextBox2");&lt;/span&gt;&lt;/div&gt;
            &lt;div style="line-height: normal"&gt;&lt;span style="font-size: 10pt"&gt;}&lt;/span&gt;&lt;/div&gt;
            &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
            &lt;div&gt; &lt;/div&gt;
            &lt;/font&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt; Create a method to update the value of the controls in the form. Basically this function checks whether the current process needs an invoke, if yes comes through the builtin invoke method.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/145029.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/04/25/accessing-interop-dlls-makes-winforms-exes-non-responsive.aspx</guid>
            <pubDate>Mon, 25 Apr 2011 11:16:20 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GinoAbraham/comments/145029.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/04/25/accessing-interop-dlls-makes-winforms-exes-non-responsive.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/145029.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Enums in C# - To get text value from corresponding number</title>
            <category>General Dotnet Tips</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/04/14/enum-a-different-thought.aspx</link>
            <description>&lt;p&gt;Enums are always a favourite when we want to restrict users while sending some string to a generic methods. Was exploring how to get the text of the enum from the correspoing number. .Typecasting the number to the enum type would get the text from enum. Have shared a sample on this&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font size="2"&gt;Using System;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;namespace&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ConsoleApplication1 { &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;class &lt;/font&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Program&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;enum &lt;/font&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;WeekDays&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; { Sun = 1, Mon = 2, Tue, Wed, Thu, Fri, Sat }&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;static&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; Main(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;[] args) {&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Console&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.WriteLine(((&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;WeekDays&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Thu).ToString());&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Console&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.WriteLine(((&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;WeekDays&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)1).ToString());&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Console&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Read();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;}}}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Output :&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;5&lt;/p&gt;
&lt;p&gt;Sun&lt;/p&gt; &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/144861.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/04/14/enum-a-different-thought.aspx</guid>
            <pubDate>Thu, 14 Apr 2011 03:45:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GinoAbraham/comments/144861.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/04/14/enum-a-different-thought.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/144861.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Updating Mutliselect CheckBox columns in sharepoint 2010 using SPClientCotext</title>
            <category>Sharepoint 2010</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/04/14/updating-mutliselect-checkbox-columns-in-sharepoint-2010-using-spclientcotext.aspx</link>
            <description>&lt;p&gt;In one of my project we had a scenario where we have to update a multi select choice column in sharepoint list from out client application. The asp.net way of comma seperated way was tried but didnt work for us. After lot of trial and error we found that the value should can updated as a string array.&lt;/p&gt;
&lt;p&gt;oList["MultiChoiceColeName"] = new string{"FirstVal", "ThirdVal", "lastVal"};&lt;/p&gt; &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/144860.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/04/14/updating-mutliselect-checkbox-columns-in-sharepoint-2010-using-spclientcotext.aspx</guid>
            <pubDate>Thu, 14 Apr 2011 03:24:59 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GinoAbraham/comments/144860.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/04/14/updating-mutliselect-checkbox-columns-in-sharepoint-2010-using-spclientcotext.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/144860.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Lotus Notes Interop to connect from dotnet application to Lotus Notes Database</title>
            <category>General Dotnet Tips</category>
            <category>Sharepoint 2010</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/04/11/lotus-notes-interop-to-connect-from-dotnet-application-to-lotus.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Tahoma"&gt;While connecting to Lotus notes database from dotnet application using Interop.Domino dll, I was getting the following error.  (“Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7} failed due to the following error: 80040154”)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Tahoma"&gt;When i installed Domino Server setup we the issue was solved. But unforunately this will not roll out as we might have to run the migration application in different machines. After searching a lot i net i found an article in IBM site about a dll named nlsxbe.dll.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Tahoma"&gt;Once I registered this dll using regsvr32, i was able to connect to lotus database with just lotus client installation and Interop.Domino object.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Tahoma"&gt;nlsxbe.dll will be found in lotus notes installed folder.  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Tahoma"&gt;More to come on lotus notes migration, watch this space.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/144795.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/04/11/lotus-notes-interop-to-connect-from-dotnet-application-to-lotus.aspx</guid>
            <pubDate>Mon, 11 Apr 2011 10:43:01 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GinoAbraham/comments/144795.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/04/11/lotus-notes-interop-to-connect-from-dotnet-application-to-lotus.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/144795.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Powersheel script to Clear all Items in Sharepoint List</title>
            <category>Sharepoint 2010</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/03/29/powersheel-script-to-clear-all-items-in-sharepoint-list.aspx</link>
            <description>&lt;p&gt;The below given powershell script will clear all items in a list. You should use powershell IDE to run this script.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")&lt;/p&gt;
&lt;p&gt;$siteObj = new-object Microsoft.SharePoint.SPSite ( "&lt;a href="http://yousiteurl/"&gt;http://yousiteurl&lt;/a&gt;" )&lt;br /&gt;
$SPweb = $siteObj.OpenWeb()&lt;br /&gt;
"Web is : " + $SPweb.Title&lt;/p&gt;
&lt;p&gt;$oList = $SPweb.Lists["you list name"];&lt;/p&gt;
&lt;p&gt;$oList.Title + " : Total Items Count is " + $oList.ItemCount&lt;/p&gt;
&lt;p&gt;$collListItems = $oList.Items;&lt;br /&gt;
$count = $collListItems.Count - 1&lt;/p&gt;
&lt;p&gt;for($intIndex = $count; $intIndex -gt -1; $intIndex--)&lt;br /&gt;
{&lt;br /&gt;
        "Deleting : " + $intIndex&lt;br /&gt;
        $collListItems.Delete($intIndex);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/144560.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/03/29/powersheel-script-to-clear-all-items-in-sharepoint-list.aspx</guid>
            <pubDate>Tue, 29 Mar 2011 04:55:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GinoAbraham/comments/144560.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/03/29/powersheel-script-to-clear-all-items-in-sharepoint-list.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/144560.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Getting Distinct Column Values from a (C#)Datatable </title>
            <category>General Dotnet Tips</category>
            <link>http://geekswithblogs.net/GinoAbraham/archive/2011/03/29/getting-distinct-column-values-from-a-cdatatable-again.aspx</link>
            <description>&lt;div&gt;&lt;span style="font-size: 9pt"&gt;The following code snippet shows you a way to extract distinct values in a specific column from a datatable.&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt; &lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="color: green; font-size: 9.5pt"&gt;            // Datatable Creation&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            &lt;span style="color: #2b91af"&gt;DataTable&lt;/span&gt; dt = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;DataTable&lt;/span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            &lt;span style="color: #2b91af"&gt;DataColumn&lt;/span&gt; dc = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;DataColumn&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Col1"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dt.Columns.Add(dc);&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dc = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;DataColumn&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"Col2"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dt.Columns.Add(dc);&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt; &lt;/div&gt;
&lt;div style="line-height: normal"&gt; &lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            &lt;span style="color: #2b91af"&gt;DataRow&lt;/span&gt; dr = dt.NewRow();&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dr[0] = &lt;span style="color: #a31515"&gt;"A1"&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dr[1] = &lt;span style="color: #a31515"&gt;"B1"&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dt.Rows.Add(dr);&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dr = dt.NewRow();&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dr[0] = &lt;span style="color: #a31515"&gt;"A1"&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dr[1] = &lt;span style="color: #a31515"&gt;"B2"&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dt.Rows.Add(dr);&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dr = dt.NewRow();&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dr[0] = &lt;span style="color: #a31515"&gt;"A1"&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dr[1] = &lt;span style="color: #a31515"&gt;"B3"&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            dt.Rows.Add(dr);&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt; &lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;&lt;font color="#008000"&gt;           // To Copy distinct values from col1 to a different datatable&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;span style="font-size: 9.5pt"&gt;            &lt;span style="color: #2b91af"&gt;DataTable&lt;/span&gt; uniqueCols = dt.DefaultView.ToTable(&lt;span style="color: blue"&gt;true&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"col1"&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt; &lt;/div&gt;
&lt;div style="line-height: normal"&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-size: 9pt"&gt;We have got disctinct values of  col1 into &lt;/span&gt;&lt;span style="font-size: 10pt"&gt;uniqueColTable. DefaultView.Totable can accept more than one column. The first parameter indicates that the method should fecth disinct values. you can also write dt.DefaultView.ToTable(&lt;span style="color: blue"&gt;true&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"col1","col2"&lt;/span&gt;); which will fecth distinct values from both the column combination and copy that to new datatable.&lt;/span&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/GinoAbraham/aggbug/144558.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gino Abraham</dc:creator>
            <guid>http://geekswithblogs.net/GinoAbraham/archive/2011/03/29/getting-distinct-column-values-from-a-cdatatable-again.aspx</guid>
            <pubDate>Tue, 29 Mar 2011 03:47:08 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GinoAbraham/comments/144558.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GinoAbraham/archive/2011/03/29/getting-distinct-column-values-from-a-cdatatable-again.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/GinoAbraham/comments/commentRss/144558.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
