<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Microsoft Office Sharepoint Server</title>
	
	<link>http://www.fivenumber.com</link>
	<description>It's all about MOSS</description>
	<lastBuildDate>Sat, 13 Mar 2010 13:15:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
<link>http://www.fivenumber.com</link>
<url>http://www.fivenumber.com/wp-content/mbp-favicon/5.jpg</url>
<title>Microsoft Office Sharepoint Server</title>
</image>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/sharepointserverblog" /><feedburner:info uri="sharepointserverblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/sharepointserverblog" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fsharepointserverblog" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>United Nations agencies websites powered by Sharepoint</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/7WEZ96GcoM0/</link>
		<comments>http://www.fivenumber.com/united-nations-agencies-websites-powered-by-sharepoint/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 13:05:44 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[MOSS - General]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=675</guid>
		<description><![CDATA[The websites of  United Nations Development Program &#8211; Solutions Network of Asia Pacific (UNDP-SNAP) and United Nations Office for Project Services (UNOPS) built with Sharepoint
The great gigantic sites http://www.snap-undp.org/ and http://www.unops.org/ already developed in Sharepoint, in order to:

Humanize user experience with feel of branding and look.
Modernizing the development with rich internet experience
Generalizing the content [...]]]></description>
			<content:encoded><![CDATA[<p>The websites of  <strong>United Nations Development Program &#8211; Solutions Network of Asia Pacific</strong> (UNDP-SNAP) and <strong>United Nations Office for Project Services</strong> (UNOPS) built with Sharepoint</p>
<p>The great gigantic sites <a title="UNDP - SNAP" href="http://www.snap-undp.org/" target="_blank">http://www.snap-undp.org/</a> and <a title="UNOPS" href="http://www.unops.org/" target="_blank">http://www.unops.org/</a> already developed in Sharepoint, in order to:</p>
<ul>
<li>Humanize user experience with feel of branding and look.</li>
<li>Modernizing the development with rich internet experience</li>
<li>Generalizing the content management system</li>
</ul>
<p>The sites are heavily used over on internet, the folks of UNDP and UNOPS extensively developed, customized, branded the site one that cannot imagine the underlying supporting technology which was extended over on Internet web platform.</p>
<p>After bearing in mind a number of alternative solutions, UNDP made the conclusion to build its Solutions Network of Asia Pacific (SNAP) portal using <strong>Microsoft® Office SharePoint® Server 2007</strong></p>
<p>&#8220;<em><strong>From simple file sharing, e-mail messaging and phone communications, we have moved on and now have the capacity to share document libraries, participate in real-time discussion boards, have centralized communities of practice, and execute document check-in check-out using SharePoint Server 2007,</strong></em>&#8221; says Norman Sanders, Regional ICT Officer at UNDP Regional Centre, Bangkok.</p>
<p>Please look in to <a title="UNDP case study" href="http://www.microsoft.com/asia/publicsector/government/UNDPcasestudy.mspx" target="_blank">UNDP case study</a></p>
<p>It’s a breathing of fresh air when a website loads fast and clean, two good examples are <a title="UNDP - SNAP" href="http://www.snap-undp.org/" target="_blank">UNDP-SNAP</a> and <a title="UNOPS" href="http://www.unops.org/" target="_blank">UNOPS</a> sites, proved by creating websites on Sharepoint platform loads very quickly. The UNOPS site supports multiple languages like Spanish, French including English.</p>
<table>
<tbody>
<tr>
<td valign="top">
<p><div id="attachment_676" class="wp-caption aligncenter" style="width: 264px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/03/UNDP-SNAP.gif" rel="lightbox[675]"><img class="size-medium wp-image-676" title="UNDP - Solution Networks of Asia-Pacific" src="http://www.fivenumber.com/wp-content/uploads/2010/03/UNDP-SNAP-254x300.gif" alt="UNDP - Solution Networks of Asia-Pacific" width="254" height="300" /></a><p class="wp-caption-text">UNDP - Solution Networks of Asia-Pacific</p></div></td>
<td valign="top">
<p><div id="attachment_677" class="wp-caption aligncenter" style="width: 282px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/03/UNOPS.gif" rel="lightbox[675]"><img class="size-medium wp-image-677" title="United Nations Office for Project Services" src="http://www.fivenumber.com/wp-content/uploads/2010/03/UNOPS-272x299.gif" alt="United Nations Office for Project Services" width="272" height="299" /></a><p class="wp-caption-text">United Nations Office for Project Services</p></div></td>
</tr>
</tbody>
</table>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=7WEZ96GcoM0:Ac_fI_W-5wI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/7WEZ96GcoM0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/united-nations-agencies-websites-powered-by-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/united-nations-agencies-websites-powered-by-sharepoint/</feedburner:origLink></item>
		<item>
		<title>MVP OPEN DAY 2010 at MSIDC, HYD</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/rQl6O3tY8V0/</link>
		<comments>http://www.fivenumber.com/mvp-open-day-2010-at-msidc-hyd/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 15:17:45 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MVP]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=655</guid>
		<description><![CDATA[The MVP open day South Asia sessions started with the IT Pro Round table by Ravi Sankar, addressing the details how IT Pro evangelism team to be forwarded.
Then followed by the DPE Round table with Stuti Shukla. In DPE session we were asked to present our thoughts on topics like
Top 5 Challenges faced by developers
How [...]]]></description>
			<content:encoded><![CDATA[<p>The MVP open day South Asia sessions started with the IT Pro Round table by Ravi Sankar, addressing the details how IT Pro evangelism team to be forwarded.</p>
<p>Then followed by the DPE Round table with Stuti Shukla. In DPE session we were asked to present our thoughts on topics like</p>
<p>Top 5 Challenges faced by developers</p>
<p>How Microsoft can better meet the needs of the SME segment</p>
<p>How they can compete more effectively in the web space.</p>
<p>Our team and all other presented excellent presentations, kept their thoughts. we have got the opportunity on including the thoughts on topic &#8216;Top 5 Challenges faced by developers&#8217; where we had put out thoughts.</p>
<p>Stuti Shukla the collected all the feedback from the teams.</p>
<p>Following are few pictures at MVP open day</p>
<div id="attachment_656" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/02/1.jpg" rel="lightbox[655]"><img class="size-medium wp-image-656" title="MVP Open Day accommodation at ISTA hotel, HYD" src="http://www.fivenumber.com/wp-content/uploads/2010/02/1-300x199.jpg" alt="MVP Open Day accommodation at ISTA hotel, HYD" width="300" height="199" /></a><p class="wp-caption-text">MVP Open Day accommodation at ISTA hotel, HYD</p></div>
<div id="attachment_657" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/02/3.jpg" rel="lightbox[655]"><img class="size-medium wp-image-657" title="Group Photo at MSIDC, Hyderabad" src="http://www.fivenumber.com/wp-content/uploads/2010/02/3-300x201.jpg" alt="Group Photo at MSIDC, Hyderabad" width="300" height="201" /></a><p class="wp-caption-text">Group Photo at MSIDC, Hyderabad</p></div>
<div id="attachment_658" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/02/5.jpg" rel="lightbox[655]"><img class="size-medium wp-image-658" title="One more Group Photo" src="http://www.fivenumber.com/wp-content/uploads/2010/02/5-300x201.jpg" alt="One more Group Photo" width="300" height="201" /></a><p class="wp-caption-text">One more Group Photo</p></div>
<div id="attachment_659" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/02/7.jpg" rel="lightbox[655]"><img class="size-medium wp-image-659" title="Karaoke Events" src="http://www.fivenumber.com/wp-content/uploads/2010/02/7-300x199.jpg" alt="Karaoke Events" width="300" height="199" /></a><p class="wp-caption-text">Karaoke Events</p></div>
<div id="attachment_660" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/02/9.jpg" rel="lightbox[655]"><img class="size-medium wp-image-660" title="MSIDC campus, HYD" src="http://www.fivenumber.com/wp-content/uploads/2010/02/9-300x199.jpg" alt="MSIDC campus, HYD" width="300" height="199" /></a><p class="wp-caption-text">MSIDC campus, HYD</p></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=rQl6O3tY8V0:xakMbwH6enU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/rQl6O3tY8V0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/mvp-open-day-2010-at-msidc-hyd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/mvp-open-day-2010-at-msidc-hyd/</feedburner:origLink></item>
		<item>
		<title>Microsoft Most Valuable Professional</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/xlTSnLi-3UA/</link>
		<comments>http://www.fivenumber.com/microsoft-most-valuable-professional/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 16:32:56 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=646</guid>
		<description><![CDATA[Happy to inform you that, on 1st January 2010 I have received a mail from Microsoft that I have been awarded as Microsoft Most Valuable Professional (MVP) in Sharepoint Server. What a surprise! I am so thrilled, thank you so much MICROSOFT for recognizing my contributions and honoring me with MVP award
The mail I received [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_647" class="wp-caption aligncenter" style="width: 600px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/01/MVPLogo.jpg" rel="lightbox[646]"><img class="size-full wp-image-647" title="MVP Logo" src="http://www.fivenumber.com/wp-content/uploads/2010/01/MVPLogo.jpg" alt="MVP Logo" width="590" height="111" /></a><p class="wp-caption-text">MVP Logo</p></div>
<p>Happy to inform you that, on 1st January 2010 I have received a mail from Microsoft that I have been awarded as Microsoft Most Valuable Professional (MVP) in Sharepoint Server. What a surprise! I am so thrilled, thank you so much MICROSOFT for recognizing my contributions and honoring me with MVP award</p>
<p>The mail I received from Microsoft</p>
<p>Dear G Kumar,</p>
<p>Congratulations! We are pleased to present you with the 2010 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in SharePoint Server technical communities during the past year.</p>
<p>Also in this email:</p>
<p>* About your MVP Award Gift<br />
* How to access www.mvpaward.com to begin taking advantage of your award benefits<br />
* Your MVP Identification Number<br />
* MVP Award Program Code of Conduct</p>
<p>The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say &#8220;Thank you for your technical leadership.&#8221;</p>
<p>Toby Richards<br />
General Manager<br />
Community &amp; Online Support</p>
<p>***********************************************************************************************************</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=xlTSnLi-3UA:oXxX2iDC0AA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/xlTSnLi-3UA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/microsoft-most-valuable-professional/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/microsoft-most-valuable-professional/</feedburner:origLink></item>
		<item>
		<title>Yet another Sharepoint sample site template</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/J3ZYrMEeM5g/</link>
		<comments>http://www.fivenumber.com/yet-another-sharepoint-sample-site-template/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 12:51:24 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Customization with SPD]]></category>
		<category><![CDATA[MOSS - Master Pages]]></category>
		<category><![CDATA[MOSS - Site Templates]]></category>
		<category><![CDATA[Master Pages]]></category>
		<category><![CDATA[Sample Master Pages]]></category>
		<category><![CDATA[site template]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=636</guid>
		<description><![CDATA[Here I created a simple sample Sharepoint site template with rounded corners.
This template allows you to create a new site with rounded corners around the webparts
Download the site template
Step by step installation:

Log into your SharePoint site
Go to Site Settings, under Galleries click on Site Template
Then, click on Upload to upload the site template on to [...]]]></description>
			<content:encoded><![CDATA[<p>Here I created a simple sample Sharepoint site template with rounded corners.</p>
<p>This template allows you to create a new site with rounded corners around the webparts</p>
<div id="attachment_637" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/11/1.gif" rel="lightbox[636]"><img class="size-medium wp-image-637" title="Sharepoint Sample Site Template" src="http://www.fivenumber.com/wp-content/uploads/2009/11/1-300x154.gif" alt="Sharepoint Sample Master Page" width="300" height="154" /></a><p class="wp-caption-text">Sharepoint Sample Site Template</p></div>
<p><a title="Five Number Sample Site Template" href="http://www.fivenumber.com/wp-content/uploads/2009/11/5NumberSiteTemplate_Pink.stp" target="_blank">Download the site template</a></p>
<p><strong>Step by step installation:</strong></p>
<ul>
<li>Log into your SharePoint site</li>
<li>Go to <strong>Site Settings</strong>, under <strong>Galleries</strong> click on <strong>Site Template</strong></li>
<li>Then, click on <strong>Upload </strong>to upload the site template on to the site</li>
<li>Browse to the downloaded file and click <strong>Open</strong></li>
<li>Click <strong>Ok </strong>to complete the upload process and now the template is available for you to use</li>
</ul>
<p><strong>Step by step creating of site:</strong></p>
<ul>
<li>Log into your Sharepoint site</li>
<li>Go to <strong>Site Settings</strong>, under <strong>Site Administration</strong> section click on <strong>Sites and Workspaces</strong></li>
<li>On<strong> Sites and Workspaces</strong> page click on <strong>Create </strong>for creating a new site</li>
<li>Provide the necessary information, then select <strong>Custom</strong> tab</li>
<li>You can see the uploaded template listed select the template <strong>5NumberSiteTemplate_Pink.stp</strong></li>
<li>Finally, click on <strong>Create</strong></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=J3ZYrMEeM5g:QjXifuqsu4c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/J3ZYrMEeM5g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/yet-another-sharepoint-sample-site-template/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/yet-another-sharepoint-sample-site-template/</feedburner:origLink></item>
		<item>
		<title>Sharepoint list form generator</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/fVhJn6KXkbM/</link>
		<comments>http://www.fivenumber.com/sharepoint-list-form-generator/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 15:49:38 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Object Model]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Tool Parts]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=598</guid>
		<description><![CDATA[Today I am going to show you how to generate a list form dynamically as soon as you select the list name you can see the form generated for you with file upload field (attachment). I also know that there is  an excellent solution Sharepoint Form Generator developed by Alon Havivi, but still I want [...]]]></description>
			<content:encoded><![CDATA[<p>Today I am going to show you how to generate a list form dynamically as soon as you select the list name you can see the form generated for you with file upload field (attachment). I also know that there is  an excellent solution <a title="Sharepoint Form Generator" href="http://sfg.codeplex.com/" target="_blank">Sharepoint Form Generator</a> developed by <a title="Alon Havivi's SharePoint 2007 Blog" href="http://havivi.blogspot.com/2009/06/sharepoint-form-generator.html" target="_blank">Alon Havivi</a>, but still I want to share with you, so that for some one the code may be helpful as a whole or part of it</p>
<p>No problem whether your list contains 1 field or 100 fields, code will  generate all the &#8216;n&#8217; no.of fields with file upload field (attachment) contained in the list. It loops through all the input fields and creates at runtime.</p>
<p>All  you have to do is, open visual studio 2005/2008 create a new project using webpart template use the code from <a title="FormGeneratorWebPart1.cs" href="http://www.fivenumber.com/wp-content/uploads/2009/10/SharepointFormGenerator-WebPart1.txt" target="_blank">WebPart1.cs</a> and <a title="FormGeneratorToolPart.cs" href="http://www.fivenumber.com/wp-content/uploads/2009/10/SharepointFormGenerator-ToolPart.txt" target="_blank">FormGeneratorToolPart.cs</a> build the project, place the .dll file in GAC or site bin directory, add the necessary safe control tag in Web.config file, import the webpart in to gallery, and add the same on to your site, after adding the webpart in your site you have to select the list name from the webpart properties, so that you can see the generated form similar to the form as in NewForm.aspx</p>
<div id="attachment_599" class="wp-caption aligncenter" style="width: 153px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/10/2.gif" rel="lightbox[598]"><img class="size-medium wp-image-599" title="Select the list name from the list of lists" src="http://www.fivenumber.com/wp-content/uploads/2009/10/2-143x300.gif" alt="Select the list name from the list of lists" width="143" height="300" /></a><p class="wp-caption-text">Select the list name from the list of lists</p></div>
<div id="attachment_600" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/10/1.gif" rel="lightbox[598]"><img class="size-medium wp-image-600" title="List form generated" src="http://www.fivenumber.com/wp-content/uploads/2009/10/1-300x109.gif" alt="List form generated" width="300" height="109" /></a><p class="wp-caption-text">List form generated</p></div>
<p>Download the complete source code (<strong>Please Note</strong>: Code cannot be viewed properly on the web page, so please use the below links to view the code or for downloading)</p>
<p><a title="FormGeneratorWebPart1.cs" href="http://www.fivenumber.com/wp-content/uploads/2009/10/SharepointFormGenerator-WebPart1.txt" target="_blank">WebPart1.cs<br />
</a><a title="FormGeneratorToolPart.cs" href="http://www.fivenumber.com/wp-content/uploads/2009/10/SharepointFormGenerator-ToolPart.txt" target="_blank">FormGeneratorToolPart.cs</a></p>
<p><strong>WebPart1.cs</strong></p>
<pre name="code" class="c-sharp">
using System;
using System.Web;
using System.IO;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using System.Web.UI.WebControls;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

namespace FormGenerator
{
    [Guid("93612d52-737c-4e83-83c3-a228910e87a3")]
    public class FormGenerator : Microsoft.SharePoint.WebPartPages.WebPart
    {
        Table oFormTable;
        FileUpload oFormFileUpload;
        FieldLabel oFormLabelField;
        FormField oFormField;
        Button oFormButtonSubmit;
        Label oFormLabelMessage;

        SPList oFormList;

        private string _FormList = string.Empty;

        string qstitle = string.Empty;
        string qsmission = string.Empty;

        public string FormList
        {
            get { return _FormList; }
            set { _FormList = value; }
        }

        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            oFormTable = new Table();
            oFormTable.CellPadding = 0;
            oFormTable.CellSpacing = 0;            

            oFormLabelMessage = new Label();
            oFormLabelMessage.ID = "lbl_message";
            oFormLabelMessage.CssClass = "ms-formvalidation";
            this.Controls.Add(oFormLabelMessage);

            //Generate Form
            GenerateFormList();
        }

        private void GenerateFormList()
        {
            SPWeb oWeb = Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(Context);
            if (FormList != "")
            {
                try
                {
                    oFormList = oWeb.Lists[FormList];
                    foreach (SPField oField in oFormList.Fields)
                    {
                        if (oField.Type == SPFieldType.Attachments)
                        {
                            FieldLabel oLabelAttachmentField = new FieldLabel();
                            oLabelAttachmentField.ControlMode = SPControlMode.New;
                            oLabelAttachmentField.ListId = oFormList.ID;
                            oLabelAttachmentField.FieldName = oField.InternalName;

                            oFormFileUpload = new FileUpload();
                            oFormFileUpload.ID = "FileUpload";

                            AttachmentsField oAttachmentField = new AttachmentsField();
                            oAttachmentField.ControlMode = SPControlMode.New;
                            oAttachmentField.ListId = oFormList.ID;
                            oAttachmentField.FieldName = oField.InternalName;
                            oAttachmentField.Controls.Add(oFormFileUpload);
                            oAttachmentField.ID = "Control_" + oField.InternalName;

                            TableRow oRowAttachment = new TableRow();
                            oFormTable.Rows.Add(oRowAttachment);
                            TableCell oCellAttachmentLabel = new TableCell();
                            oRowAttachment.Cells.Add(oCellAttachmentLabel);

                            oCellAttachmentLabel.Controls.Add(oLabelAttachmentField);
                            oCellAttachmentLabel.CssClass = "ms-formlabel";
                            TableCell oCellAttachment = new TableCell();
                            oRowAttachment.Cells.Add(oCellAttachment);
                            oCellAttachment.Controls.Add(oAttachmentField);
                            oCellAttachment.CssClass = "ms-formbody";
                        }
                    }

                    // Loop through all the fields in the list
                    foreach (SPField oField in oFormList.Fields)
                    {
                        // Avoid Hidden, Read Only, Attachments field
                        if (!oField.Hidden &#038;&#038; !oField.ReadOnlyField &#038;&#038; oField.Type != SPFieldType.Attachments)
                        {
                            oFormLabelField = new FieldLabel();
                            oFormLabelField.ControlMode = SPControlMode.New;
                            oFormLabelField.ListId = oFormList.ID;
                            oFormLabelField.FieldName = oField.InternalName;

                            oFormField = new FormField();
                            oFormField.ControlMode = SPControlMode.New;
                            oFormField.ListId = oFormList.ID;
                            oFormField.FieldName = oField.InternalName;
                            oFormField.ID = "Control_" + oField.InternalName;

                            TableRow oRow = new TableRow();
                            oFormTable.Rows.Add(oRow);

                            TableCell oCellLabel = new TableCell();
                            oRow.Cells.Add(oCellLabel);
                            TableCell oCellControl = new TableCell();
                            oRow.Cells.Add(oCellControl);

                            oCellLabel.Controls.Add(oFormLabelField);
                            oCellControl.Controls.Add(oFormField);

                            oCellLabel.CssClass = "ms-formlabel";
                            oCellControl.CssClass = "ms-formbody";
                        }
                    }

                    //Create ASP.Net button
                    oFormButtonSubmit = new Button();
                    oFormButtonSubmit.ID = "btn_submit";
                    oFormButtonSubmit.Text = "OK";
                    oFormButtonSubmit.CssClass = "ms-ButtonHeightWidth";
                    oFormButtonSubmit.Click += new EventHandler(oFormButtonSubmit_Click);
                    this.Controls.Add(oFormButtonSubmit);

                    // Create the row for the Submit button
                    TableRow oRowButton = new TableRow();
                    oFormTable.Rows.Add(oRowButton);

                    // Create the cell for the Submit button
                    TableCell oCellButton = new TableCell();
                    oCellButton.ColumnSpan = 2;
                    oRowButton.Cells.Add(oCellButton);

                    Controls.Add(oFormTable);
                }
                catch (Exception ex)
                {
                    Page.Response.Write(ex.ToString());
                }
            }
            else
            {
                Page.Response.Write("Select valid <b>List</b> from webpart properties");
            }
        }

        void oFormButtonSubmit_Click(object sender, EventArgs e)
        {
            SPSite mySite = SPControl.GetContextSite(Context);
            SPWeb myWeb = SPControl.GetContextWeb(Context);
            SPList myList = myWeb.Lists[FormList];
            SPListItem myItem = myList.Items.Add();

            //Validating the controls
            foreach (SPField sField in myList.Fields)
            {
                if (sField.Required == true)
                {
                    string oControl = "Control_" + sField.InternalName.ToString();
                    Control oFieldControl = this.FindControl(oControl);
                    FormField sFormField = (FormField)oFieldControl;
                    if ((sFormField.Value) == null || (sFormField.Value.ToString()) == "")
                    {
                        oFormLabelMessage.Visible = true;
                        oFormLabelMessage.Text = "* indicates required fields";
                        return;
                    }
                }
            }
            foreach (SPField oField in myList.Fields)
            {
                string oFieldID = "Control_" + oField.InternalName;
                Control sFieldControl = this.FindControl(oFieldID);
                if (sFieldControl != null)
                {
                    if (oField.Type != SPFieldType.Attachments)
                    {
                        FormField sFormField = (FormField)sFieldControl;
                        myItem[oField.InternalName] = sFormField.Value;
                    }
                    else
                    {
                        AttachmentsField sAttachmentField = (AttachmentsField)sFieldControl;
                        FileUpload oFileControl = (FileUpload)sAttachmentField.FindControl("FileUpload");
                        if (oFileControl != null)
                        {
                            try
                            {
                                HttpPostedFile oPostedFile = oFileControl.PostedFile;
                                string oFileName = Path.GetFileName(oPostedFile.FileName);
                                if (oPostedFile.ContentLength > 0)
                                {
                                    Stream oInputStream = oPostedFile.InputStream;
                                    byte[] oBT = new byte[oPostedFile.InputStream.Length];
                                    oPostedFile.InputStream.Seek(0, SeekOrigin.Begin);
                                    oPostedFile.InputStream.Read(oBT, 0, oBT.Length);
                                    myItem.Attachments.Add(oFileName, oBT);
                                }
                            }
                            catch (Exception ex)
                            {
                                oFormLabelMessage.Visible = true;
                                oFormLabelMessage.Text = ex.ToString();
                            }
                        }
                    }
                }
                myWeb.AllowUnsafeUpdates = true;
                myItem.Update();
                myWeb.AllowUnsafeUpdates = false;
                oFormLabelMessage.Visible = true;
                oFormLabelMessage.Text = "Record updated";
            }
        }

        protected override void Render(HtmlTextWriter writer)
        {
            if (FormList != "")
            {
                writer.Write("<Table align='right'><Tr><Td>");
                oFormLabelMessage.RenderControl(writer);
                writer.Write("</Td></Tr></Table>");
                writer.Write("<br/>");
                writer.Write("<Table><Tr><Td>");
                oFormTable.RenderControl(writer);
                writer.Write("</Td></Tr>");
                writer.Write("<Tr><Td align='right'>");
                oFormButtonSubmit.RenderControl(writer);
                writer.Write("</Td></Tr></Table>");
            }
            else
            {
                oFormLabelMessage.RenderControl(writer);
            }
        }

        public override ToolPart[] GetToolParts()
        {
            ToolPart[] allToolParts = new ToolPart[3];
            WebPartToolPart standardToolParts = new WebPartToolPart();
            CustomPropertyToolPart customToolParts = new CustomPropertyToolPart();
            allToolParts[0] = standardToolParts;
            allToolParts[1] = customToolParts;
            allToolParts[2] = new FormGeneratorToolPart();
            return allToolParts;
        }
    }
}
</pre>
<p><strong>FormGeneratorToolPart.cs</strong></p>
<pre name="code" class="c-sharp">
using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
using Microsoft.SharePoint;

namespace FormGenerator
{
    class FormGeneratorToolPart: Microsoft.SharePoint.WebPartPages.ToolPart
    {
        FormGenerator oFG;
        Panel oToolPartPanel;
        DropDownList oDDLListProvider;

        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            oToolPartPanel = new Panel();
            Controls.Add(oToolPartPanel);

            oDDLListProvider = new DropDownList();
            oToolPartPanel.Controls.Add(oDDLListProvider);

            PopulateProviderList();
        }

        private void PopulateProviderList()
        {
            SPListCollection myListCol = SPContext.Current.Web.Lists;
            oDDLListProvider.AppendDataBoundItems = true;
            foreach (SPList myList in myListCol)
            {
                ListItem myListItem = new ListItem(myList.Title, myList.Title);
                oFG = (FormGenerator)this.ParentToolPane.SelectedWebPart;
                if (oFG.FormList == myList.Title)
                    myListItem.Selected = true;
                oDDLListProvider.Items.Add(myListItem);
            }
        }

        public override void ApplyChanges()
        {
            base.ApplyChanges();
            oFG.FormList = oDDLListProvider.SelectedValue;
        }

        public override void SyncChanges()
        {
            base.SyncChanges();
            oDDLListProvider.SelectedValue = oFG.FormList.ToString();
        }

        protected override void RenderToolPart(System.Web.UI.HtmlTextWriter output)
        {
            output.Write("<b>List Name Lookup:</b>");
            output.Write("<br/><br/>");
            oDDLListProvider.RenderControl(output);
            output.Write("<br/>
<div class='UserSectionTitle'>&nbsp;</div>

<br/>");
        }
    }
}
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=fVhJn6KXkbM:8iqWEdET2aE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/fVhJn6KXkbM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/sharepoint-list-form-generator/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/sharepoint-list-form-generator/</feedburner:origLink></item>
		<item>
		<title>A quick look on WSS Out Of Box web services</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/lT4oajVfBMI/</link>
		<comments>http://www.fivenumber.com/a-quick-look-on-wss-out-of-box-web-services/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 07:40:38 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[Web Services]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=593</guid>
		<description><![CDATA[Here I am going to show you how to create/delete site collection and create/delete list using WSS OOB webservices
Creating site collection

static void Main(string[] args)
{

AdminService.Admin admService = new AdminService.Admin();
admService.Credentials = System.Net.CredentialCache.DefaultCredentials;
try
{
admService.CreateSite("http://fivenumber:5/sites/someothername", "SomeotherTitle", "SomeotherDescription", 1033, "STS#0", "Fivenumber\\g.vijaikumar", "GVijaiKumar", "g.vijaikumar@fivenumber.com", "", "");
Console.WriteLine("Site Collection Created:");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
Console.WriteLine(ex);
}

Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}

Deleting site collection

static void Main(string[] args)
{

AdminService.Admin admService = new [...]]]></description>
			<content:encoded><![CDATA[<p>Here I am going to show you how to create/delete site collection and create/delete list using WSS OOB webservices</p>
<p><strong>Creating site collection</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{

AdminService.Admin admService = new AdminService.Admin();
admService.Credentials = System.Net.CredentialCache.DefaultCredentials;
try
{
admService.CreateSite("http://fivenumber:5/sites/someothername", "SomeotherTitle", "SomeotherDescription", 1033, "STS#0", "Fivenumber\\g.vijaikumar", "GVijaiKumar", "g.vijaikumar@fivenumber.com", "", "");
Console.WriteLine("Site Collection Created:");
}
catch (System.Web.Services.Protocols.SoapException ex)
{
Console.WriteLine(ex);
}

Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Deleting site collection</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{

AdminService.Admin admService = new AdminService.Admin();
admService.Credentials = System.Net.CredentialCache.DefaultCredentials;
try
{
admService.DeleteSite("http://fivenumber:5/sites/someothername");
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
</pre>
<p><strong>Creating List</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{

List50.Lists listService = new List50.Lists();
listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
try
{
XmlNode ndList = listService.AddList("List_Name", "List_Description", 100);
Console.WriteLine("List Created:");
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
</pre>
<p><strong>Deleting List</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{

List50.Lists listService = new List50.Lists();
listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
try
{
listService.DeleteList("List_Name");//, "List_Description", 100);
Console.WriteLine("List Deleted:");
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=lT4oajVfBMI:hiPXtKhExRY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/lT4oajVfBMI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/a-quick-look-on-wss-out-of-box-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/a-quick-look-on-wss-out-of-box-web-services/</feedburner:origLink></item>
		<item>
		<title>A quick look on Sharepoint object model programs</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/qRUY1P061b4/</link>
		<comments>http://www.fivenumber.com/a-quick-look-on-sharepoint-object-model-programs/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 13:11:16 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Object Model]]></category>
		<category><![CDATA[MOSS - Quick Look]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Webparts]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=578</guid>
		<description><![CDATA[Here I am going to show you that the actions which we perform normally with UI, those also can be done programmatically, the same thing I am going to show in this post, this post is mainly targeted for beginners those who are new to Sharepoint object model, a quick watch on programs to create [...]]]></description>
			<content:encoded><![CDATA[<p>Here I am going to show you that the actions which we perform normally with UI, those also can be done programmatically, the same thing I am going to show in this post, this post is mainly targeted for beginners those who are new to Sharepoint object model, a quick watch on programs to create sub sites, lists, showing web apps etc.<br />
<strong>Creating Sub Site:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
SPWebCollection myWebCol = myWeb.Webs;
SPWeb mynewweb = myWebCol.Add("Web url", "Web Title", "Web Description", 1033, "STS#0", false, false);
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Creating List:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
myWeb.Lists.Add("My New List", "My new list description", myWeb.ListTemplates["Custom List"]);
SPList newList = myWeb.Lists["My New List"];
newList.OnQuickLaunch = true;
newList.Update();
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all top-level sites in a farm</strong></p>
<pre name="code" class="c-sharp">
static void Main()        
 {
 foreach (SPWebApplication myWebApp in SPWebService.ContentService.WebApplications)
 {
 foreach (SPSite mySiteCol in myWebApp.Sites)
 {
 try
 {
 Console.WriteLine(mySiteCol.Url);
 }
 catch (Exception e)
 {
 Console.WriteLine(e);
 }                   
 }
 }
 Console.WriteLine("Press any key to continue.....");
 Console.ReadLine();
 }
</pre>
<p><strong>Show all site collection in web application:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWebApplication myWebApp = mySite.WebApplication;
SPSiteCollection mySiteCol = myWebApp.Sites;
foreach (SPSite SingleSite in mySiteCol)
{
Console.WriteLine(SingleSite.Url.ToString());
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all subsites in site collection:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
foreach (SPWeb myWeb in mySite.AllWebs)
{
Console.WriteLine(myWeb.Url.ToString());
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all Roles in a site:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
foreach (SPRoleDefinition myRoleDef in myWeb.RoleDefinitions)
{
Console.WriteLine(myRoleDef.Name);
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all Alerts in a site:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
foreach (SPAlert myAlerts in myWeb.Alerts)
{
Console.WriteLine(myAlerts.Title);
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all Lists in a site:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
foreach (SPList myList in myWeb.Lists)
{
Console.WriteLine(myList.Title.ToString());
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all List Templates in a site:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
foreach (SPListTemplate myListTemplate in myWeb.ListTemplates)
{
Console.WriteLine(myListTemplate.Name);
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all Fields in a List:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
SPList myList = myWeb.Lists["List Name"];
foreach (SPField myField in myList.Fields)
{
Console.WriteLine(myField.InternalName);
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all Items in a List column:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
SPList myList = myWeb.Lists["List Name"];
SPQuery myQuery = new SPQuery();
myQuery.Query = "";//Your Query
SPListItemCollection myItemCol = myList.GetItems(myQuery);
foreach (SPListItem myListItem in myItemCol)
{
Console.WriteLine(myListItem["Column Name"].ToString());
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Delete all Items from a list:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
SPList myList=myWeb.Lists["List Name"];
myWeb.AllowUnsafeUpdates = true;
int count = 1;
for (int i = 0; i < myList.ItemCount; i++)
{
SPListItem myListitem = myList.Items[0];
myListitem.Delete();
Console.WriteLine(count + " item(s) deleted");
count++;
}
myWeb.AllowUnsafeUpdates = false;
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all Groups in a site:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
foreach (SPGroup myGroup in myWeb.Groups)
{
Console.WriteLine(myGroup.Name);
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<p><strong>Show all Users in a group:</strong></p>
<pre name="code" class="c-sharp">
static void Main(string[] args)
{
SPSite mySite = new SPSite("http://servername:port");
SPWeb myWeb = mySite.OpenWeb();
SPGroup myGroup = myWeb.Groups["Group Name"];
foreach (SPUser myUser in myGroup.Users)
{
Console.WriteLine(myUser.Name);
}
Console.WriteLine("Press any key to continue.....");
Console.ReadLine();
}
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=qRUY1P061b4:39d3F-VPaRo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/qRUY1P061b4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/a-quick-look-on-sharepoint-object-model-programs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/a-quick-look-on-sharepoint-object-model-programs/</feedburner:origLink></item>
		<item>
		<title>Sharepoint hit counter web part</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/wLf0UWmXjxA/</link>
		<comments>http://www.fivenumber.com/sharepoint-hit-counter-web-part/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 11:26:43 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Object Model]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=567</guid>
		<description><![CDATA[On 11th November, 2009 I have published the HitCounter webpart solution on to Codeplex
You can download the Hit Counter webpart from http://hitcounter.codeplex.com/
Comments on this solution are very much appreciated  
Thanks for looking into this
]]></description>
			<content:encoded><![CDATA[<p>On 11th November, 2009 I have published the HitCounter webpart solution on to <a title="CodePlex" href="http://www.codeplex.com/" target="_blank">Codeplex</a></p>
<p>You can download the Hit Counter webpart from <a title="Sharepoint Hit Counter Webpart" href="http://hitcounter.codeplex.com/" target="_blank">http://hitcounter.codeplex.com/</a></p>
<p>Comments on this solution are very much appreciated <img src='http://www.fivenumber.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Thanks for looking into this</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=wLf0UWmXjxA:Z_teMsRhvS0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/wLf0UWmXjxA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/sharepoint-hit-counter-web-part/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/sharepoint-hit-counter-web-part/</feedburner:origLink></item>
		<item>
		<title>Copy Sharepoint list items from one site to another programmatically</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/Q2yD_WGxNKg/</link>
		<comments>http://www.fivenumber.com/copy-sharepoint-list-items-from-one-site-to-another-programmatically/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 06:13:47 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Object Model]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=541</guid>
		<description><![CDATA[In my earlier post, I have show you how to Copy items from one list to another, using Sharepoint designer workflow now we learn how to copy list items from one Sharepoint site to another site programmatically
Before executing the code I have created two Sharepoint sites, first is http://fivenumber:5/ and the second http://fivenumber:50/
I have also [...]]]></description>
			<content:encoded><![CDATA[<p>In my earlier post, I have show you how to <a title="Copy item from one list to another, using Sharepoint designer workflow" href="http://www.fivenumber.com/copy-item-from-one-list-to-another-using-sharepoint-designer-workflow/" target="_blank">Copy items from one list to another, using Sharepoint designer workflow</a> now we learn how to copy list items from one Sharepoint site to another site programmatically</p>
<p>Before executing the code I have created two Sharepoint sites, first is <strong>http://fivenumber:5/</strong> and the second <strong>http://fivenumber:50/</strong></p>
<p>I have also created custom list in each site, <strong>Source List</strong> in site <strong>http://fivenumber:5/</strong> and <strong>Desitination List</strong> in <strong>http://fivenumber:50/</strong></p>
<p>Here in this scenario I have chosen Console Application template because it doens&#8217;t contains any input fields to show as webpart and also to avoid GAC registration, safe controls etc., I felt it will be easy to execute the code in Console.</p>
<p><a title="Copy list items from one Sharepoint site to another site programmatically" href="http://www.fivenumber.com/wp-content/uploads/2009/08/Copy%20list%20items%20from%20one%20to%20another%20programmatically.txt" target="_blank">Download complete source code</a></p>
<div id="attachment_542" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/08/Source-List.gif" rel="lightbox[541]"><img class="size-medium wp-image-542" title="Source List" src="http://www.fivenumber.com/wp-content/uploads/2009/08/Source-List-300x161.gif" alt="Source List" width="300" height="161" /></a><p class="wp-caption-text">Source List</p></div>
<div id="attachment_544" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/08/Copied-List-Items.gif" rel="lightbox[541]"><img class="size-medium wp-image-544" title="Copied List Items" src="http://www.fivenumber.com/wp-content/uploads/2009/08/Copied-List-Items-300x147.gif" alt="Copied List Items" width="300" height="147" /></a><p class="wp-caption-text">Copied List Items</p></div>
<div id="attachment_543" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/08/Destination-List.gif.gif" rel="lightbox[541]"><img class="size-medium wp-image-543" title="Destination List" src="http://www.fivenumber.com/wp-content/uploads/2009/08/Destination-List.gif-300x160.gif" alt="Destination List" width="300" height="160" /></a><p class="wp-caption-text">Destination List</p></div>
<pre name="code" class="c-sharp">
using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.SharePoint;

namespace CopyListItems
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                SPSite mySourceSite = new SPSite("http://fivenumber:5/");
                SPWeb mySourceWeb = mySourceSite.OpenWeb();
                SPList mySourceList = mySourceWeb.Lists["Source List"];
                SPQuery mySourceListQuery = new SPQuery();
                mySourceListQuery.Query = "<OrderBy><FieldRef Name='Title' />" +
                                "<FieldRef Name='Employee_x0020_Name' />" +
                                "<FieldRef Name='Designation' />" +
                                "<FieldRef Name='Age' />" +
                                "</OrderBy>";
                SPListItemCollection mySourceItemColl = mySourceList.GetItems(mySourceListQuery);
                int count = 0;
                foreach (SPListItem mySourceListItem in mySourceItemColl)
                {
                    string SourceEmpId = mySourceListItem["Employee Id"].ToString();
                    string SourceEmpName = mySourceListItem["Employee Name"].ToString();
                    string SourceDesig = mySourceListItem["Designation"].ToString();
                    string SourceAge = mySourceListItem["Age"].ToString();

                    SPSite myDestinationSite = new SPSite("http://fivenumber:50");
                    SPWeb myDestinationWeb = myDestinationSite.OpenWeb();
                    SPList myDestinationList = myDestinationWeb.Lists["Destination List"];
                    SPListItem myDestinationListItem = myDestinationList.Items.Add();

                    myDestinationListItem["Employee Id"] = SourceEmpId;
                    myDestinationListItem["Employee Name"] = SourceEmpName;
                    myDestinationListItem["Designation"] = SourceDesig;
                    myDestinationListItem["Age"] = SourceAge;
                    myDestinationWeb.AllowUnsafeUpdates = true;
                    myDestinationListItem.Update();
                    myDestinationWeb.AllowUnsafeUpdates = false;
                    count++;
                    Console.WriteLine(count+" item(s) copied");
                }
                Console.WriteLine("Press enter to continue");
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.Write(ex);
                Console.WriteLine("Press enter to continue");
                Console.ReadLine();
            }
        }
    }
}
</pre>
<p>If you have Lookup column in your Source List and want to copy the same data in to Destination List, you have to create an instance for SPFieldLookupValue class like below&#8230;..</p>
<p>Let&#8217;s suppose &#8216;Employee Name&#8217; column is lookup field, comment or remove the line # 29 in the above code and replace with below code snippet</p>
<pre name="code" class="c-sharp">
SPFieldLookupValue mySourceLookupEmpName = new SPFieldLookupValue(mySourceListItem["Employee Name"].ToString());
string SourceEmpName = mySourceLookupEmpName.LookupId.ToString();
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=Q2yD_WGxNKg:Lrct3QJbYWA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/Q2yD_WGxNKg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/copy-sharepoint-list-items-from-one-site-to-another-programmatically/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/copy-sharepoint-list-items-from-one-site-to-another-programmatically/</feedburner:origLink></item>
		<item>
		<title>Export SPGridView to Excel spreadsheet in Sharepoint 2007</title>
		<link>http://feedproxy.google.com/~r/sharepointserverblog/~3/gtAVMzqgwgI/</link>
		<comments>http://www.fivenumber.com/export-spgridview-to-excel-spreadsheet-in-sharepoint-2007/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 08:38:09 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Object Model]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=528</guid>
		<description><![CDATA[In my last post I have show you how to retrieve current user profile in Sharepoint 2007, before that I have also posted on how to display custom list items in SPGridView
Today I am going to work on how to export SPGridView items into Excel spreadsheet in Sharepoint 2007
Most of the code I have used [...]]]></description>
			<content:encoded><![CDATA[<p>In my last post I have show you how to <a title="Retrieve current user profile" href="http://www.fivenumber.com/retrieve-current-user-profile-in-sharepoint-2007/" target="_blank">retrieve current user profile in Sharepoint 2007</a>, before that I have also posted on how to <a title="Display custom list items in SPGridView" href="http://www.fivenumber.com/displaying-sharepoint-custom-list-items-in-spgridview/" target="_blank">display custom list items in SPGridView</a></p>
<p>Today I am going to work on how to export SPGridView items into Excel spreadsheet in Sharepoint 2007</p>
<p>Most of the code I have used form Matt Berseth blog article <a title="Export GridView to Excel" href="http://mattberseth.com/blog/2007/04/export_gridview_to_excel_1.html" target="_blank">Export GridView to Excel</a> so thanks to Matt and also thanks to my colleague Ram Gowri who helped me on this</p>
<p><a title="Export SPGridView to Excel spreadsheet" href="http://www.fivenumber.com/wp-content/uploads/2009/07/Export%20SPGridView%20items%20to%20Excel%20spreadsheet.txt" target="_blank">Download complete source code</a></p>
<p>To run the code first you need to create a custom list, name it as Countries, then create two columns int he same list Country and State</p>
<div id="attachment_530" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/07/15.gif" rel="lightbox[528]"><img class="size-medium wp-image-530" title="Sharepoint OOB custom list" src="http://www.fivenumber.com/wp-content/uploads/2009/07/15-300x241.gif" alt="Sharepoint OOB custom list" width="300" height="241" /></a><p class="wp-caption-text">Sharepoint OOB custom list</p></div>
<div id="attachment_538" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/07/25.gif" rel="lightbox[528]"><img class="size-medium wp-image-538" title="Displaying Sharepoint custom list items into SPGridView" src="http://www.fivenumber.com/wp-content/uploads/2009/07/25-300x228.gif" alt="Displaying Sharepoint custom list items into SPGridView" width="300" height="228" /></a><p class="wp-caption-text">Displaying Sharepoint custom list items into SPGridView</p></div>
<div id="attachment_532" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/07/31.gif" rel="lightbox[528]"><img class="size-medium wp-image-532" title="Exporting SPGridView to Excel Spreadsheet" src="http://www.fivenumber.com/wp-content/uploads/2009/07/31-300x149.gif" alt="Exporting SPGridView to Excel Spreadsheet" width="300" height="149" /></a><p class="wp-caption-text">Exporting SPGridView to Excel Spreadsheet</p></div>
<div id="attachment_533" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2009/07/41.gif" rel="lightbox[528]"><img class="size-medium wp-image-533" title="After exporting SPGridView items in to Excel spreadsheet" src="http://www.fivenumber.com/wp-content/uploads/2009/07/41-300x280.gif" alt="After exporting SPGridView items in to Excel spreadsheet" width="300" height="280" /></a><p class="wp-caption-text">After exporting SPGridView items in to Excel spreadsheet</p></div>
<pre name="code" class="c-sharp">
using System;
using System.IO;
using System.Web;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using System.Web.UI.WebControls;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

namespace ExportGridtoExcel
{
    [Guid("2fa65763-1ef1-4173-8a77-685e840f0196")]
    public class ExportGridtoExcel : System.Web.UI.WebControls.WebParts.WebPart
    {
        SPGridView myGridView;
        SPDataSource myDataSource = new SPDataSource();
        Button oBtn_Export;

        protected override void CreateChildControls()
        {
            oBtn_Export = new Button();
            oBtn_Export.Text = "Export to Excel";
            oBtn_Export.CssClass = "ButtonHeightWidth";
            oBtn_Export.Click += new EventHandler(oBtn_Export_Click);
            this.Controls.Add(oBtn_Export);

            myGridView = new SPGridView();
            myGridView.Enabled = true;
            myGridView.AutoGenerateColumns = false;                       

            SPBoundField colTitle = new SPBoundField();
            colTitle.DataField = "Country";
            colTitle.HeaderText = "Country";
            this.myGridView.Columns.Add(colTitle);

            SPBoundField colMission = new SPBoundField();
            colMission.DataField = "State";
            colMission.HeaderText = "State";
            this.myGridView.Columns.Add(colMission);

            this.Controls.Add(myGridView);
        }

        void oBtn_Export_Click(object sender, EventArgs e)
        {
            ExportToExcel("CountryState.xls", myGridView);
        }

        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            SPSite mySite = SPContext.Current.Site;
            SPWeb myWeb = SPContext.Current.Web;
            SPList list = myWeb.Lists["Countries"];
            myDataSource.List = list;
            myGridView.DataSource = myDataSource;
            myGridView.DataBind();
        }

        public static void ExportToExcel(string strFileName, SPGridView gv)
        {
            using (StringWriter sw = new StringWriter())
            {
                using (HtmlTextWriter htw = new HtmlTextWriter(sw))
                {
                    //  Create a form to contain the grid
                    Table table = new Table();

                    //  add the header row to the table
                    if (gv.HeaderRow != null)
                    {
                        PrepareControlForExport(gv.HeaderRow);
                        table.Rows.Add(gv.HeaderRow);
                    }

                    //  add each of the data rows to the table
                    foreach (GridViewRow row in gv.Rows)
                    {
                        PrepareControlForExport(row);
                        table.Rows.Add(row);
                    }

                    //  add the footer row to the table
                    if (gv.FooterRow != null)
                    {
                        PrepareControlForExport(gv.FooterRow);
                        table.Rows.Add(gv.FooterRow);
                    }

                    //  render the table into the htmlwriter
                    table.RenderControl(htw);

                    HttpContext.Current.Response.Clear();
                    HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", strFileName));
                    HttpContext.Current.Response.ContentType = "application/ms-excel";
                    HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
                    //render the htmlwriter into the response
                    HttpContext.Current.Response.Write(sw.ToString());
                    HttpContext.Current.Response.End();
                }
            }
        }

        private static void PrepareControlForExport(Control control)
        {
            for (int i = 0; i &lt; control.Controls.Count; i++)
            {
                Control current = control.Controls[i];
                if (current is LinkButton)
                {
                    control.Controls.Remove(current);
                    control.Controls.AddAt(i, new LiteralControl((current as LinkButton).Text));
                }
                else if (current is ImageButton)
                {
                    control.Controls.Remove(current);
                    control.Controls.AddAt(i, new LiteralControl((current as ImageButton).AlternateText));
                }
                else if (current is HyperLink)
                {
                    control.Controls.Remove(current);
                    control.Controls.AddAt(i, new LiteralControl((current as HyperLink).Text));
                }
                else if (current is DropDownList)
                {
                    control.Controls.Remove(current);
                    control.Controls.AddAt(i, new LiteralControl((current as DropDownList).SelectedItem.Text));
                }
                else if (current is CheckBox)
                {
                    control.Controls.Remove(current);
                    control.Controls.AddAt(i, new LiteralControl((current as CheckBox).Checked ? "True" : "False"));
                }

                if (current.HasControls())
                {
                    PrepareControlForExport(current);
                }
            }
        }
    }
}</pre>
<p><script src="js/shCore.js"></script> <script src="js/shBrushCSharp.js"></script><br />
<script src="js/shBrushXml.js"></script> <script type="text/javascript">// <![CDATA[
  dp.SyntaxHighlighter.ClipboardSwf = '/flash/clipboard.swf'; dp.SyntaxHighlighter.HighlightAll('code');
// ]]&gt;</script></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sharepointserverblog?a=gtAVMzqgwgI:QQ1H3ZW_2rE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sharepointserverblog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/sharepointserverblog/~4/gtAVMzqgwgI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/export-spgridview-to-excel-spreadsheet-in-sharepoint-2007/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.fivenumber.com/export-spgridview-to-excel-spreadsheet-in-sharepoint-2007/</feedburner:origLink></item>
	</channel>
</rss>
