<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://cs.vbcity.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Andy Bonner&amp;#39;s Blog</title><subtitle type="html">My SharePoint titbits and other things that take my fancy.</subtitle><id>http://cs.vbcity.com/blogs/skullcrusher/atom.aspx</id><link rel="alternate" type="text/html" href="http://cs.vbcity.com/blogs/skullcrusher/default.aspx" /><link rel="self" type="application/atom+xml" href="http://cs.vbcity.com/blogs/skullcrusher/atom.aspx" /><generator uri="http://communityserver.org" version="4.0.30417.1769">Community Server</generator><updated>2008-09-26T14:08:00Z</updated><entry><title>Visual Studio 2005 is configuring the environment for first time use </title><link rel="alternate" type="text/html" href="/blogs/skullcrusher/archive/2008/12/18/visual-studio-2005-is-configuring-the-environment-for-first-time-use.aspx" /><id>/blogs/skullcrusher/archive/2008/12/18/visual-studio-2005-is-configuring-the-environment-for-first-time-use.aspx</id><published>2008-12-17T19:24:00Z</published><updated>2008-12-17T19:24:00Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="text-decoration:underline;"&gt;Copied from old Blog April 2007&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Every now &amp;amp; then I would get the first time launch message appearing when I was starting up VS 2005, which wasted lots of time&amp;nbsp;&amp;amp; I finally got around to googling a solution.&lt;/p&gt;
&lt;p&gt;It turned out that it was a problem with using roaming profiles ( I switch between virtual machines quite often for various development requirements which I thinks what causes it) &amp;amp; I found the solutions &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa718685.aspx"&gt;in this MSDN article&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But I&amp;#39;ll post it here as well for future reference&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr id="null" /&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When any one of the Visual Studio family of products is used with Windows Roaming Profiles, the first time launch message that says &amp;quot;Visual Studio 2005 is configuring the environment for first time use. This might take a few minutes.&amp;quot; might appear on every session startup. This might cause unnecessary slowdowns in startup performance.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;To resolve this issue&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Click on the Tools &amp;gt; Options... Select &amp;quot;Import and Export Settings&amp;quot;, and change the path under &amp;quot;Automatically save my settings to this file:&amp;quot; to a path that is NOT under the &amp;quot;My Documents&amp;quot; directory.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cs.vbcity.com/aggbug.aspx?PostID=53" width="1" height="1"&gt;</content><author><name>skullcrusher</name><uri>http://cs.vbcity.com/members/skullcrusher/default.aspx</uri></author><category term="VS2005" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/VS2005/default.aspx" /></entry><entry><title>Get List of Site Users in InfoPath Form</title><link rel="alternate" type="text/html" href="/blogs/skullcrusher/archive/2008/12/16/get-list-of-site-users-in-infopath-form.aspx" /><id>/blogs/skullcrusher/archive/2008/12/16/get-list-of-site-users-in-infopath-form.aspx</id><published>2008-12-16T02:48:00Z</published><updated>2008-12-16T02:48:00Z</updated><content type="html">&lt;p&gt;Copied from old Blog from Dec 2006&lt;/p&gt;
&lt;p&gt;I had the need the other day for a way of displaying a list of site users on an InfoPath form that the user can select from and came across this article on Jan Tielens&amp;#39; blog which I thought would do the trick. Unfortunately it was for SharePoint 2003 rather than 2007 so I had to play around a bit to get it working, &amp;amp; came up with 2 methods of accompishing it which I wanted to share with you.&lt;/p&gt;
&lt;p&gt;Create a New Visual Studio .Net project based on the InfoPath Form Template and call it ExampleGetSiteUsers.&lt;/p&gt;
&lt;p&gt;The first thing you&amp;#39;ll need to do is go into Tools -&amp;gt; Form Options and set the forms security level to Full Trust&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="603" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/SecurityLevel.gif" height="519" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Then create your main data source like so &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="220" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/MainDataSource.gif" height="174" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;We&amp;#39;ll need to create a DataConnection to the GetUserCollectionFromSite Method of the UserGroup SharePoint webservice.&lt;/p&gt;
&lt;p&gt;From the Visual Studio menu select Data -&amp;gt; Data Connections &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="431" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/DataConn.gif" height="432" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click Add&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/NewConn.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Select Create a new connection to Receive data then click Next &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/Source.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Select Web service then click Next &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/WSdetails.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Enter &lt;a href="http://YourServerName/_vti_bin/UserGroup.asmx"&gt;http://YourServerName/_vti_bin/UserGroup.asmx&lt;/a&gt; for the webservice location making sure you put in your moss servers name then click next &lt;/p&gt;
&lt;p&gt;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/SelectMethod.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Select the GetUserCollectionFromSite method then click Next &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/Store.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click Next &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/NameConnection.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Enter a meaningful name for the data connection &amp;amp; ensure &amp;quot;Automatically retrieve data when the form is opened&amp;quot; is ticked. Then click Finish &amp;amp; close the data connections window. We now need to add a second data connection that will use the following XML file as it&amp;#39;s source. Copy the code below to a new file &amp;amp; name it SiteUsersAndGroups.xml save it to a location on your machine that you&amp;#39;ll remember. &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;xml&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;version&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;encoding&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;utf-8&amp;quot;&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;?&amp;gt;&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SiteUsersAndGroups&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Users&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;xmlns&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;lt;a href=&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;/span&gt;http://schemas.microsoft.com/sharepoint/soap/directory/&amp;quot;&amp;gt;http://schemas.microsoft.com/sharepoint/soap/directory/&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;a&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;&amp;quot;&amp;gt;
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;User&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ID&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sid&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;LoginName&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Email&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Notes&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;IsSiteAdmin&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;IsDomainGroup&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;User&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ID&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sid&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;LoginName&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Email&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Notes&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;IsSiteAdmin&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;IsDomainGroup&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Users&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SiteUsersAndGroups&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;From the Visual Studio menu select Data -&amp;gt; Data Connections Add a new connection to Receive data &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/SourceXml.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;This time select XML Document as the source then click Next &lt;/p&gt;
&lt;p&gt;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/FileLocation.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Enter the location of the XML document we just created then click Next &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/IncludeFile.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click Next&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/FinishDC.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click Finish &amp;amp; close the Data Connections window &lt;/p&gt;
&lt;p&gt;Create a couple of DropDown Lists on your Form for the 2 fields in the main data source&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="406" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/CreateDropDowns.gif" height="291" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Go into the properties of the first Drop Down that is bound to our method1 field&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="418" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/DropDownProperties.gif" height="575" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Select &amp;quot;Look up values from an external data source&amp;quot; &amp;amp; set the Data source to the connection we just created Click on the Select XPath for the entries&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="308" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/SelectXPath.gif" height="359" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Select the User repeating group &amp;amp; click OK &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="418" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/SetValues.gif" height="575" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Set the value to the ID and the Display name to the Name We now need to create yet another Data connection that we can use as the source for our second Drop Down. Normally you wouldn&amp;#39;t need to do this as you could use the same source for both, but because I&amp;#39;m showing 2 methods which will be slightly different in the content they show we&amp;#39;ll need a second connection. Follow exactly the same steps as we used to create the first data connection to an xml file, but name the connection SiteUsers as in the second method we&amp;#39;ll be stripping out groups. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/SiteUsers.gif" height="429" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Now we&amp;#39;ll go into the properties of the second Drop Down &amp;amp; bind it to this new connection like so&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="418" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.GetAllUsers/DropDown2Properties.gif" height="575" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You&amp;#39;ll now need to create a new class within your project called Users.cs which contains the following code &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//------------------------------------------------------------------------------&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// &lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//     This code was generated by a tool.&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//     Runtime Version:2.0.50727.42&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//     Changes to this file may cause incorrect behavior and will be lost if&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//     the code is regenerated.&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// &lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//------------------------------------------------------------------------------&lt;/span&gt;


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Xml.Serialization;


&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// This source code was auto-generated by xsd, Version=2.0.50727.42.&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//&lt;/span&gt;



&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
[System.CodeDom.Compiler.GeneratedCodeAttribute(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;xsd&amp;quot;&lt;/span&gt;, &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;2.0.50727.42&amp;quot;&lt;/span&gt;)]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;code&amp;quot;&lt;/span&gt;)]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;true&lt;/span&gt;)]
[System.Xml.Serialization.XmlRootAttribute(Namespace &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;&amp;lt;a href=&amp;quot;&lt;/span&gt;http:&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//schemas.microsoft.com/sharepoint/soap/directory/&amp;quot;&amp;gt;http://schemas.microsoft.com/sharepoint/soap/directory/&amp;lt;/a&amp;gt;&amp;quot;, IsNullable = false)]&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; partial &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt; Users
{


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; User[] itemsField;


    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
    [System.Xml.Serialization.XmlElementAttribute(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;User&amp;quot;&lt;/span&gt;)]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; User[] Items
    {
        get
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.itemsField;
        }
        set
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.itemsField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }
}


&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
[System.CodeDom.Compiler.GeneratedCodeAttribute(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;xsd&amp;quot;&lt;/span&gt;, &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;2.0.50727.42&amp;quot;&lt;/span&gt;)]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;code&amp;quot;&lt;/span&gt;)]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;true&lt;/span&gt;)]
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; partial &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt; User
{


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; idField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; sidField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; nameField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; loginNameField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; emailField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; notesField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; isSiteAdminField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; isDomainGroupField;


    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; ID
    {
        get
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.idField;
        }
        set
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.idField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; Sid
    {
        get
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.sidField;
        }
        set
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.sidField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; Name
    {
        get
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.nameField;
        }
        set
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.nameField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; LoginName
    {
        get
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.loginNameField;
        }
        set
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.loginNameField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; Email
    {
        get
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.emailField;
        }
        set
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.emailField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; Notes
    {
        get
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.notesField;
        }
        set
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.notesField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; IsSiteAdmin
    {
        get
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.isSiteAdminField;
        }
        set
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.isSiteAdminField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/// &lt;/span&gt;
    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; IsDomainGroup
    {
        get
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.isDomainGroupField;
        }
        set
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.isDomainGroupField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }
}&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Finally we&amp;#39;re ready to write some code in the FormCode file Here&amp;#39;s some I cooked up earlier which I&amp;#39;ve heavily commented so you can see what I&amp;#39;m doing. &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; Microsoft.Office.InfoPath;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Xml;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Xml.XPath;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Xml.Serialization;


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;namespace&lt;/span&gt; ExampleGetSiteUsers
{
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; partial &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt; FormCode
    {
        &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// NOTE: The following procedure is required by Microsoft Office InfoPath.&lt;/span&gt;
        &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// It can be modified using Microsoft Office InfoPath.&lt;/span&gt;
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; InternalStartup()
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.EventManager.FormEvents.Loading += &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; LoadingEventHandler(FormEvents_Loading);
        }


        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; FormEvents_Loading(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;object&lt;/span&gt; sender, LoadingEventArgs e)
        {
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//get an XPathNavigator to our webservice method&lt;/span&gt;
            XPathNavigator siteUsers &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.DataSources[&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;GetUserCollectionFromSite&amp;quot;&lt;/span&gt;].CreateNavigator();


            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//create the XmlNamespaceManager that will allow us to navigate the xml&lt;/span&gt;
            XmlNamespaceManager umanager &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; XmlNamespaceManager(siteUsers.NameTable);
            umanager.AddNamespace(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;dfs&amp;quot;&lt;/span&gt;, &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;&amp;lt;a href=&amp;quot;&lt;/span&gt;http:&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&amp;gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;lt;/a&amp;gt;&amp;quot;);&lt;/span&gt;
            umanager.AddNamespace(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;tns&amp;quot;&lt;/span&gt;, &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;&amp;lt;a href=&amp;quot;&lt;/span&gt;http:&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//schemas.microsoft.com/sharepoint/soap/directory/&amp;quot;&amp;gt;http://schemas.microsoft.com/sharepoint/soap/directory/&amp;lt;/a&amp;gt;&amp;quot;);&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//get the node that contains all the users from the call to the web service&lt;/span&gt;
            XPathNavigator allusers &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; siteUsers.SelectSingleNode(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetUserCollectionFromSiteResponse/tns:GetUserCollectionFromSiteResult/tns:GetUserCollectionFromSite/tns:Users&amp;quot;&lt;/span&gt;, umanager);


            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//method 1&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//get an XPathNavigator to our data source used by the first Drop Down&lt;/span&gt;
            XPathNavigator siteUsersAndGroups &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.DataSources[&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;SiteUsersAndGroups&amp;quot;&lt;/span&gt;].CreateNavigator();


            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//create the XmlNamespaceManager that will allow us to navigate the xml&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//we can reuse this for our second data source in method 2 as the xml schema is identical&lt;/span&gt;
            XmlNamespaceManager dmanager &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; XmlNamespaceManager(siteUsersAndGroups.NameTable);
            dmanager.AddNamespace(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;tns&amp;quot;&lt;/span&gt;, &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;&amp;lt;a href=&amp;quot;&lt;/span&gt;http:&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//schemas.microsoft.com/sharepoint/soap/directory/&amp;quot;&amp;gt;http://schemas.microsoft.com/sharepoint/soap/directory/&amp;lt;/a&amp;gt;&amp;quot;);&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//get the node within this data source that represents users&lt;/span&gt;
            XPathNavigator dusers &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; siteUsersAndGroups.SelectSingleNode(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;/SiteUsersAndGroups/tns:Users&amp;quot;&lt;/span&gt;, dmanager);


            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//fill this data source with the users returned by the web service call&lt;/span&gt;
            dusers.ReplaceSelf(allusers);



            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//method 2&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//We&amp;#39;ll start off by deserializing the xml node of users we got from the web service call&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//into our users class to make workingwith the data easier.&lt;/span&gt;
            Users su;
            XmlSerializer serializer &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; XmlSerializer(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;typeof&lt;/span&gt;(Users));
            su &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (Users)serializer.Deserialize(allusers.ReadSubtree());


            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//create an XPathNavigator to the second data source we created from the xml document&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//i.e. the data source we&amp;#39;re using for the second Drop Down&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//specifically the first User node&lt;/span&gt;
            XPathNavigator siteUser &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.DataSources[&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;SiteUsers&amp;quot;&lt;/span&gt;].CreateNavigator().SelectSingleNode(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;/SiteUsersAndGroups/tns:Users/tns:User&amp;quot;&lt;/span&gt;, dmanager);
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//create a clone of the this node so we can change the values&lt;/span&gt;
            XPathNavigator currentNode &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; siteUser.Clone();


            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//We&amp;#39;ll need to iterate through the users in our User class in&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//reverse order otherwise they&amp;#39;ll appear in our drop down in decending order&lt;/span&gt;
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;for&lt;/span&gt; (&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;int&lt;/span&gt; i &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; su.Items.Length &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;-&lt;/span&gt; 1; i &amp;gt;= 0; i--)
            {
                User user &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; su.Items;
                &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//Check each user to see if it&amp;#39;s actually a group as we don&amp;#39;t want those&lt;/span&gt;
                &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (user.IsDomainGroup == &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;False&amp;quot;&lt;/span&gt;)
                {
                    XPathNavigator newNode &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; currentNode;
                    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//change some of the value on the clone, I&amp;#39;m only changing the 2 we need for this example&lt;/span&gt;
                    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//but you could change them all&lt;/span&gt;
                    newNode.SelectSingleNode(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;/SiteUsersAndGroups/tns:Users/tns:User/@ID&amp;quot;&lt;/span&gt;, dmanager).SetValue(user.ID);
                    newNode.SelectSingleNode(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;/SiteUsersAndGroups/tns:Users/tns:User/@Name&amp;quot;&lt;/span&gt;, dmanager).SetValue(user.Name);


                    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;try&lt;/span&gt;
                    {
                        &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//insert the new node after the current one&lt;/span&gt;
                        currentNode.InsertAfter(newNode);
                    }
                    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;catch&lt;/span&gt; (Exception)
                    {
                    }
                    currentNode &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; newNode.Clone();
                }
            }
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//this is the first blank node from our sample xml file so we need to get rid of it&lt;/span&gt;
            siteUser.DeleteSelf();
        }
    }
}&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Go ahead &amp;amp; run the project. The first drop down will show all users &amp;amp; groups for your site, whilst the second will only show the users. You&amp;#39;ll notice that the second Drop Down will be at a blank record at the end of the list of users &amp;amp; may be wondering why. The reason is that in our xml file that we used for the data connection there were 2 blank user nodes, which we need to have originally to tell InfoPath that User is a repeating group. Now that the connection is created we can edit the file that is stored within our project to get rid of the second blank record which will fix this up. To be able to edit the file you&amp;#39;ll need to make sure that you haven&amp;#39;t got manifest.xsf open otherwise you wont be able to open the file. From the solution window open SiteUsers &amp;amp; delete the second User node, save the file &amp;amp; rerun the project &amp;amp; voila...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cs.vbcity.com/aggbug.aspx?PostID=52" width="1" height="1"&gt;</content><author><name>skullcrusher</name><uri>http://cs.vbcity.com/members/skullcrusher/default.aspx</uri></author><category term="InfoPath" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/InfoPath/default.aspx" /><category term="Moss" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Moss/default.aspx" /><category term="SharePoint" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/SharePoint/default.aspx" /></entry><entry><title>How to keep SharePoint calendar expanded when switching months</title><link rel="alternate" type="text/html" href="/blogs/skullcrusher/archive/2008/12/15/how-to-keep-sharepoint-calendar-expanded-when-switching-months.aspx" /><id>/blogs/skullcrusher/archive/2008/12/15/how-to-keep-sharepoint-calendar-expanded-when-switching-months.aspx</id><published>2008-12-14T21:17:00Z</published><updated>2008-12-14T21:17:00Z</updated><content type="html">&lt;p&gt;Ever get&amp;nbsp;frustrated when looking at a SharePoint calendar and for a particular month&amp;nbsp;you&amp;#39;ve clicked expand all then&amp;nbsp;move to a different&amp;nbsp;&amp;nbsp; month and find that you&amp;#39;re&amp;nbsp;back&amp;nbsp;in collapsed&amp;nbsp;view.&lt;/p&gt;
&lt;p&gt;Well you&amp;nbsp;can change this by making some modifications to the CORE.JS file but keep in mind that&amp;nbsp;you migh t have&amp;nbsp;to redo this customization following any SharePoint service packs that&amp;nbsp;you might apply.&lt;/p&gt;
&lt;p&gt;There&amp;#39;s basically 2 functions&amp;nbsp; that&amp;nbsp; you need to change&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GetMonthView -&amp;nbsp; called whenever you click the Expand All or Collapse&amp;nbsp;all&amp;nbsp;buttons.&lt;/li&gt;
&lt;li&gt;MoveToViewDate&amp;nbsp; - called when you navigate to&amp;nbsp;a new month&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&amp;#39;s the new code that you&amp;#39;d need in those functions&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;function&lt;/span&gt; GetMonthView(str)
{
 &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//Added by Andy Bonner to memorize state&lt;/span&gt;
 SetCookie(&amp;#39;ExpandCollapse&amp;#39;,str,&amp;#39;&amp;#39;);
 &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//Added by Andy Bonner to memorize state&lt;/span&gt;


 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; wUrl=window.location.href;
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; ExpWeek=document.getElementById(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ExpandedWeeksId&amp;quot;&lt;/span&gt;);
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt;(ExpWeek!=null)
  ExpWeek.value=str;
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;else&lt;/span&gt;
  &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; ;
 SubmitFormPost(wUrl, true);
}


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;function&lt;/span&gt; MoveToViewDate(strdate, view_type)
{
 &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//Added by Andy Bonner to keep expanded or collapsed state&lt;/span&gt;
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; ExpCol &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; GetCookie(&amp;#39;ExpandCollapse&amp;#39;);
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt;(ExpCol !&lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; null)
 {
  &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; ExpWeek=document.getElementById(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ExpandedWeeksId&amp;quot;&lt;/span&gt;);
  &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt;(ExpWeek!=null)
   ExpWeek.value=ExpCol;
 }
 &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//Added by Andy Bonner to keep expanded or collapsed state&lt;/span&gt;



 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; wUrl=window.location.href;
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (strdate !=null)
  wUrl=StURLSetVar2(wUrl,&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;CalendarDate&amp;quot;&lt;/span&gt;,escapeProperly(strdate));
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (view_type !=null)
  wUrl=StURLSetVar2(wUrl,&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;CalendarPeriod&amp;quot;&lt;/span&gt;,view_type);
 SubmitFormPost(wUrl, true);
}&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cs.vbcity.com/aggbug.aspx?PostID=49" width="1" height="1"&gt;</content><author><name>skullcrusher</name><uri>http://cs.vbcity.com/members/skullcrusher/default.aspx</uri></author><category term="Moss" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Moss/default.aspx" /><category term="SharePoint" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/SharePoint/default.aspx" /><category term="Calendar" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Calendar/default.aspx" /></entry><entry><title>SharePoint/MOSS Color Picker Custom Field</title><link rel="alternate" type="text/html" href="/blogs/skullcrusher/archive/2008/12/13/sharepoint-moss-color-picker-custom-field.aspx" /><id>/blogs/skullcrusher/archive/2008/12/13/sharepoint-moss-color-picker-custom-field.aspx</id><published>2008-12-12T21:13:00Z</published><updated>2008-12-12T21:13:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;strong&gt;&lt;em&gt;&lt;span style="text-decoration:underline;"&gt;Copied from old Blog March 2008&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Well it&amp;#39;s been a long time since my last post and I though I&amp;#39;d better get my arse into gear and share some of the stuff I&amp;#39;ve been working on. As part of some development work I was doing for a colored SharePoint Calendar I had the need to allow users to select colors to have different types of Events displayed in and couldn&amp;#39;t find a decent way of accomplishing this with the built in components of SharePoint, so I decided that this was an ideal candidate for a custom field type. Having made what I think is a useful addition to SharePoint I thought I&amp;#39;d share it with you. First I&amp;#39;ll give you a little flavour of what it looks like before we dive into the code and how it all hangs together.&lt;/p&gt;
&lt;p&gt;&lt;img width="630" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.ColorPicker/NewEditView1.jpg" alt="New Edit View 1" height="294" /&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s how the field first looks in a New or Edit form&lt;/p&gt;
&lt;p&gt;&lt;img width="656" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.ColorPicker/NewEditViewDD.jpg" alt="New Edit View DropDown" height="584" /&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s some of the color choices available&lt;/p&gt;
&lt;p&gt;&lt;img width="624" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.ColorPicker/NewEditView2.jpg" alt="New Edit View 2" height="290" /&gt;&lt;/p&gt;
&lt;p&gt;And this is what it looks like once you&amp;#39;ve made some choices &lt;/p&gt;
&lt;p&gt;So thats what the field looks like when your using it but how does it display you might be wondering, well here&amp;#39;s how you&amp;#39;d see it in a list view &lt;/p&gt;
&lt;p&gt;&lt;img width="907" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.ColorPicker/ListView.jpg" alt="List View" height="454" /&gt;&lt;/p&gt;
&lt;p&gt;Yep lovely but not very practicle is it, the real power comes when you use this value either within code or the xslt of the DataView WebPart, then you can produce some quite stunning results.&lt;/p&gt;
&lt;p&gt;&lt;img width="154" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.ColorPicker/ColorDV.jpg" alt="Color DataViewWebPart" height="142" /&gt;&lt;/p&gt;
&lt;p&gt;custom xslt using the field values &lt;/p&gt;
&lt;p&gt;&lt;img width="256" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.ColorPicker/ColorCalendarThumb.jpg" alt="Color Calendar" height="200" /&gt;&lt;/p&gt;
&lt;p&gt;Custom calendar views using the field values through code &lt;/p&gt;
&lt;p&gt;So Now that you&amp;#39;ve seen what you can do with it let&amp;#39;s get into the code itself. In this example we have 5 files &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SPColorsPickerFieldValue which inherits from SPFieldMultiColumnValue and holds the values and describes the properties for our field &lt;/li&gt;
&lt;li&gt;SPColorsPickerField which inherits from SPFieldMultiColumn and is our field &lt;/li&gt;
&lt;li&gt;SPColorsPickerFieldControl which inherits from BaseFieldControl and is the brains of the operation, basically the code behind for our ASCX &lt;/li&gt;
&lt;li&gt;ControlTemplates_SPColorsPicker.ascx which defines a SharePoint RenderingTemplate element that tells it how to render our field in New or Edit mode &lt;/li&gt;
&lt;li&gt;fldtypes_SPColorsPicker.xml which basically describes our field to SharePoint, telling it where it can be used, what it&amp;#39;s called, what the assembly is called &amp;amp; also how it should be rendered in a list view&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So how do we create a project for this custom field you ask. Well just create a Class Library project within VS2005 &amp;amp; add references for Microsoft.SharePoint and Microsoft.SharePoint.Security which you&amp;#39;ll find in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI. &lt;/p&gt;
&lt;p&gt;You also need to sign the assembly with a strong name key. Then you&amp;#39;ll need to add classes for the field, field value &amp;amp; field control. Each of these classes needs a unique guid attribute. Here&amp;#39;s the 3 classes you need &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;color:#2b91af;"&gt;SPColorsPickerFieldValue&lt;/span&gt; (holds the values and describes the properties for our field)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Text;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; Microsoft.SharePoint;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Runtime.InteropServices;


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;namespace&lt;/span&gt; SPColorsPicker
{ 
[CLSCompliant(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;false&lt;/span&gt;)]
[Guid(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;7B5DF376-E7DB-4353-AD51-7C5B69C675D6&amp;quot;&lt;/span&gt;)]
[Serializable]
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt; SPColorsPickerFieldValue : SPFieldMultiColumnValue
{ 
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//how many properties are we storing&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;const&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;int&lt;/span&gt; numberOfFields &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; 2;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//required constructor&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; SPColorsPickerFieldValue() 
: &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;base&lt;/span&gt;(numberOfFields)
{
}
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//required constructor&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; SPColorsPickerFieldValue(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; value) 
: &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;base&lt;/span&gt;(value)
{
}


&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//property for storing the font color to use&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; FontColor
{ 
get
{ 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;[0])) 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;Black&amp;quot;&lt;/span&gt;;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;else&lt;/span&gt; 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;[0];
}
set { &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;[0] &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value; }
}
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//property for storing the background color to use&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; BackgroundColor
{ 
get
{ 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;[1])) 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;White&amp;quot;&lt;/span&gt;;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;else&lt;/span&gt; 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;[1];
}
set { &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;[1] &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value; }
}
}
}&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;color:#2b91af;"&gt;SPColorsPickerField&lt;/span&gt; (our field)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Text;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Runtime.InteropServices;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; Microsoft.SharePoint;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebControls;


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;namespace&lt;/span&gt; SPColorsPicker
{ 
[CLSCompliant(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;false&lt;/span&gt;)]
[Guid(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;01FB13ED-33F3-4caa-8CCF-42DAE083291F&amp;quot;&lt;/span&gt;)]
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt; SPColorsPickerField : SPFieldMultiColumn
{ 
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//required constructor&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; SPColorsPickerField(SPFieldCollection fields, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; fieldName) 
: &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;base&lt;/span&gt;(fields, fieldName)
{
}
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//required constructor&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; SPColorsPickerField(SPFieldCollection fields, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; typeName, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; displayName) 
: &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;base&lt;/span&gt;(fields, typeName, displayName)
{
}
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//tell it which control to use for rendering this field&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;override&lt;/span&gt; BaseFieldControl FieldRenderingControl
{ 
[SharePointPermission(SecurityAction.LinkDemand, ObjectModel &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;true&lt;/span&gt;)]
get
{ 
BaseFieldControl fieldControl &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; SPColorsPickerFieldControl();
fieldControl.FieldName &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.InternalName;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; fieldControl;
}
}
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//returns the value of this field&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;override&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;object&lt;/span&gt; GetFieldValue(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; value)
{ 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(value)) 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;null&lt;/span&gt;;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; SPColorsPickerFieldValue(value);
}
}
}&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;color:#2b91af;"&gt;SPColorsPickerFieldControl&lt;/span&gt; (the brains) &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Text;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebControls;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Runtime.InteropServices;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Reflection;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Drawing;


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;namespace&lt;/span&gt; SPColorsPicker
{ 
[CLSCompliant(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;false&lt;/span&gt;)]
[Guid(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;F44DCD6A-D657-42e8-853A-ABC0713773C2&amp;quot;&lt;/span&gt;)]
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt; SPColorsPickerFieldControl : BaseFieldControl
{ 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;protected&lt;/span&gt; DropDownList ddlBackground;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;protected&lt;/span&gt; DropDownList ddlFont;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;protected&lt;/span&gt; TextBox tbSampleText;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; SPColorsPickerFieldValue fieldValue;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;protected&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;override&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; DefaultTemplateName
{ 
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//Get the RenderingTemplate in the ascx file&lt;/span&gt;
get { &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ColorsPicker&amp;quot;&lt;/span&gt;; }
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;override&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;object&lt;/span&gt; Value
{ 
get
{ 
EnsureChildControls();
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.ControlMode !&lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; SPControlMode.Display)
{ 
GetValues();
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; fieldValue;
}
set
{ 
EnsureChildControls();
fieldValue &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;as&lt;/span&gt; SPColorsPickerFieldValue;
}
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; GetValues()
{ 
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//set this instances value to whats been selected&lt;/span&gt;
fieldValue.FontColor &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; ddlFont.SelectedItem.Text;
fieldValue.BackgroundColor &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; ddlBackground.SelectedItem.Text;
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; SetValues()
{ 
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//set the controls values to whats currently stored in the field for an existing item&lt;/span&gt;
ddlFont.SelectedItem.Text &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; fieldValue.FontColor;
ddlBackground.SelectedItem.Text &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; fieldValue.BackgroundColor;
tbSampleText.ForeColor &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; Color.FromName(fieldValue.FontColor);
tbSampleText.BackColor &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; Color.FromName(fieldValue.BackgroundColor);
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;protected&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;override&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; OnInit(EventArgs e)
{ 
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//either get the value from an existing item or set it as a new value&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (ControlMode == SPControlMode.Edit || ControlMode == SPControlMode.Display)
{ 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.ListItemFieldValue !&lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;null&lt;/span&gt;) 
fieldValue &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.ListItemFieldValue &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;as&lt;/span&gt; SPColorsPickerFieldValue;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;else&lt;/span&gt; 
fieldValue &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; SPColorsPickerFieldValue();
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (ControlMode == SPControlMode.New)
{ 
fieldValue &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; SPColorsPickerFieldValue();
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;base&lt;/span&gt;.OnInit(e);
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;protected&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;override&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; OnLoad(EventArgs e)
{ 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;base&lt;/span&gt;.OnLoad(e);
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (!Page.IsPostBack &amp;amp;&amp;amp; ControlMode !&lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; SPControlMode.Display)
{ 
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//fill the DropDowns with the list of available colors&lt;/span&gt;
List&amp;lt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt;&amp;gt; allColors &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt;&amp;gt;(Enum.GetNames(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;typeof&lt;/span&gt;(System.Drawing.KnownColor)));
List&amp;lt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt;&amp;gt; systemColors &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt;&amp;gt;();
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;foreach&lt;/span&gt; (MemberInfo member &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;in&lt;/span&gt; (&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;typeof&lt;/span&gt;(System.Drawing.SystemColors)).GetProperties())
{ 
systemColors.Add(member.Name);
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;foreach&lt;/span&gt; (&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; color &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;in&lt;/span&gt; allColors)
{ 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (!systemColors.Contains(color))
{ 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.ddlBackground.Items.Add(color);
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.ddlFont.Items.Add(color);
}
}
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//register scripts to update the preview client side&lt;/span&gt;
ClientScriptManager cs &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.Page.ClientScript;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (!cs.IsClientScriptBlockRegistered(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.GetType(), &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ChangeColors&amp;quot;&lt;/span&gt;))
{ 
StringBuilder csText &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; StringBuilder();
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot; &amp;lt;SCRIPT type=text/javascript&amp;gt;&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;function changeTextColor(dropdown, textboxID)&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;{&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;var x = document.getElementById(textboxID);&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;var myindex = dropdown.selectedIndex;&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;var SelValue = dropdown.options[myindex].value;&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;x.style.color = SelValue;&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;}&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;function changeBackgroundColor(dropdown, textboxID)&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;{&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;var x = document.getElementById(textboxID);&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;var myindex = dropdown.selectedIndex;&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;var SelValue = dropdown.options[myindex].value;&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;x.style.backgroundColor = SelValue;&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;}&amp;quot;&lt;/span&gt;);
csText.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;&amp;lt;/SCRIPT&amp;gt; &amp;quot;&lt;/span&gt;);
cs.RegisterClientScriptBlock(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.GetType(), &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ChangeColors&amp;quot;&lt;/span&gt;, csText.ToString(), &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;false&lt;/span&gt;);
}
SetValues();
}
}
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;protected&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;override&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; CreateChildControls()
{ 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (Field == &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;null&lt;/span&gt;) 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt;;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;base&lt;/span&gt;.CreateChildControls();
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (ControlMode == SPControlMode.Display) 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt;;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//set the local vaiables&lt;/span&gt;
ddlFont &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (DropDownList)TemplateContainer.FindControl(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ddlFont&amp;quot;&lt;/span&gt;);
ddlBackground &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (DropDownList)TemplateContainer.FindControl(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ddlBackground&amp;quot;&lt;/span&gt;);
tbSampleText &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (TextBox)TemplateContainer.FindControl(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;tbSampleText&amp;quot;&lt;/span&gt;);
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; (!Page.IsPostBack)
{ 
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//add attributes to call the javascript functions when we choose different colors from the dropdown box&amp;#39;s&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//to update the preview client side&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; textboxID &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.tbSampleText.ClientID;
ddlBackground.Attributes.Add(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;OnChange&amp;quot;&lt;/span&gt;, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt;.Format(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;changeBackgroundColor(this,&amp;#39;{0}&amp;#39;);&amp;quot;&lt;/span&gt;, textboxID));
ddlFont.Attributes.Add(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;OnChange&amp;quot;&lt;/span&gt;, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt;.Format(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;changeTextColor(this,&amp;#39;{0}&amp;#39;);&amp;quot;&lt;/span&gt;, textboxID));
}
}
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//control how the field is rendered in display mode, doesn&amp;#39;t overide list view display which is controlled&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//by the DisplayPattern in the fldtypes xml file&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;protected&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;override&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; RenderFieldForDisplay(HtmlTextWriter output)
{ 
StringBuilder sbldr &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; StringBuilder();
sbldr.Append(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot; Sample Text&amp;quot;&lt;/span&gt;);
output.Write(sbldr.ToString());
}
}
}&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve commented the code so you can see what&amp;#39;s going on so i&amp;#39;m not going to go into more detail here.&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Compile your class library &amp;amp; install it in the GAC Now you can create the ascx file you&amp;#39;ll need &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;color:#2b91af;"&gt;ControlTemplates_SPColorsPicker.ascx&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;%@ Control Language=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;C#&amp;quot;&lt;/span&gt; Debug=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; %&amp;gt;
&amp;lt;%@ Assembly Name=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt; %&amp;gt;
&amp;lt;%@ Register TagPrefix=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;SharePoint&amp;quot;&lt;/span&gt; Assembly=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt; 
Namespace=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;Microsoft.SharePoint.WebControls&amp;quot;&lt;/span&gt; %&amp;gt;
&amp;lt;SharePoint:RenderingTemplate ID=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ColorsPicker&amp;quot;&lt;/span&gt; runat=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt; 
&amp;lt;Template&amp;gt; 
&amp;lt;table&amp;gt; 
&amp;lt;tr&amp;gt; 
&amp;lt;td &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt;=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ms-formlabel&amp;quot;&lt;/span&gt;&amp;gt; 
Background Color&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt; 
&amp;lt;asp:DropDownList ID=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ddlBackground&amp;quot;&lt;/span&gt; Width=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;200px&amp;quot;&lt;/span&gt; runat=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;
&amp;lt;/asp:DropDownList&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt; 
&amp;lt;td &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt;=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ms-formlabel&amp;quot;&lt;/span&gt;&amp;gt; 
Text Color&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt; 
&amp;lt;asp:DropDownList ID=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;ddlFont&amp;quot;&lt;/span&gt; Width=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;200px&amp;quot;&lt;/span&gt; runat=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;
&amp;lt;/asp:DropDownList&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;br /&amp;gt;
&amp;lt;asp:TextBox ID=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;tbSampleText&amp;quot;&lt;/span&gt; runat=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; Font-Bold=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;True&amp;quot;&lt;/span&gt; ReadOnly=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;True&amp;quot;&lt;/span&gt;&amp;gt;SAMPLE TEXT&amp;lt;/asp:TextBox&amp;gt;
&amp;lt;/Template&amp;gt;
&amp;lt;/SharePoint:RenderingTemplate&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Then copy the ascx file to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES&lt;/p&gt;
&lt;p&gt;Open your class library using &lt;a href="http://www.aisto.com/roeder/dotnet" title="Lutz Roeder&amp;#39;s Reflector"&gt;Lutz Roeder&amp;#39;s Reflector&lt;/a&gt; to get hold of the assembly name which you&amp;#39;ll need in the next file you need to create&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;color:#2b91af;"&gt;fldtypes_SPColorsPicker.xml&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;FieldTypes&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt; 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;FieldType&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt; 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Field&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;TypeName&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;ColorsField&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Field&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;ParentType&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;MultiColumnField&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Field&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;TypeDisplayName&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;Colors PickerField&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Field&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;TypeShortDescription&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;Pick Background and Font ColorsField&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Field&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;UserCreatable&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;TRUEField&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Field&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;ShowInListCreate&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;TRUEField&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Field&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;ShowInDocumentLibraryCreate&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;TRUEField&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Field&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;ShowInColumnTemplateCreate&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;TRUEField&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Field&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;FieldTypeClass&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;SPColorsPicker.SPColorsPickerField, SPColorsPicker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a4554e68e310c34Field&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;RenderPattern&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;DisplayPattern&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt; 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Switch&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt; 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Expr&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt; 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Column&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;
Expr&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Case&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Value&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;
Case&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Default&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt; 
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;HTML&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt; 0&amp;quot; HTMLEncode=&amp;quot;TRUE&amp;quot;/&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;HTML&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;; background-color: ]]&amp;gt;HTML&amp;gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Column&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SubColumnNumber&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;HTMLEncode&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;TRUE&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;HTML&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;&amp;quot;&amp;gt;Sample Text]]&amp;gt;HTML&amp;gt;
Default&amp;gt;
Switch&amp;gt;
RenderPattern&amp;gt;
FieldType&amp;gt;
FieldTypes&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Replace the value for FieldTypeClass with your assembly name then this file needs to be copied into C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML&lt;/p&gt;
&lt;p&gt;Now all you need to do is either recycle the application pool or do an IISReset to have this new field type available to your SharePoint Lists&lt;/p&gt;
&lt;p&gt;&lt;img width="362" src="http://cs.vbcity.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.ColorPicker/CreateColumn.jpg" alt="Create Column" height="474" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cs.vbcity.com/aggbug.aspx?PostID=54" width="1" height="1"&gt;</content><author><name>skullcrusher</name><uri>http://cs.vbcity.com/members/skullcrusher/default.aspx</uri></author><category term="Moss" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Moss/default.aspx" /><category term="SharePoint" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/SharePoint/default.aspx" /><category term="Calendar" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Calendar/default.aspx" /><category term="Custom Field" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Custom+Field/default.aspx" /><category term="Color Picker" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Color+Picker/default.aspx" /></entry><entry><title>2 Level Top Navigation</title><link rel="alternate" type="text/html" href="/blogs/skullcrusher/archive/2008/12/07/2-level-top-navigation.aspx" /><id>/blogs/skullcrusher/archive/2008/12/07/2-level-top-navigation.aspx</id><published>2008-12-07T08:15:00Z</published><updated>2008-12-07T08:15:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;This is not my own work but something I picked up from a post a came across on MSDN that I thought would be useful, so i thought I&amp;#39;d blog it here so i knew where to find it&amp;nbsp;in the future. &lt;img src="http://cs.vbcity.com/emoticons/emotion-2.gif" alt="Big Smile" /&gt;.&lt;/p&gt;
&lt;p&gt;Credit for this&amp;nbsp;goes to &lt;a target="_blank" href="http://points4share.spaces.live.com" title="Elizabeth Elizondo" class="null"&gt;Elizabeth Elizondo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;All you need to do is add this after the PlaceHolderTopNavBar ContentPlaceHolder then tweak it to your requirements.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ID&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;Sublinks&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;runat&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SharePoint:AspMenu&lt;/span&gt;
      &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ID&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;subMenu&amp;quot;&lt;/span&gt;
      &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Runat&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;
      &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;DataSourceID&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;subSiteMap&amp;quot;&lt;/span&gt;
      &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;EnableViewState&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;
      &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;AccessKey&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;lt;%$Resources:wss,navigation_accesskey%&amp;gt;&amp;quot;&lt;/span&gt;
      &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Orientation&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;Horizontal&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;StaticDisplayLevels&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;StaticItemFormatString&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;{0}&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SkipLinkText&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;StaticSubMenuIndent&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;MaximumDynamicDisplayLevels&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CssClass&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;ms-topNavContainer&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;
       &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;StaticMenuItemStyle&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CssClass&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;ms-topnav&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ItemSpacing&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;0px&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;
       &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;StaticSelectedStyle&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CssClass&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;ms-topnavselected&amp;quot;&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;
       &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;StaticHoverStyle&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CssClass&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;ms-topNavHover&amp;quot;&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SharePoint:AspMenu&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;


      &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;asp:SiteMapDataSource&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SiteMapProvider&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;CombinedNavSiteMapProvider&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ShowStartingNode&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;StartFromCurrentNode&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;StartingNodeOffset&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;        
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;id&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;subSiteMap&amp;quot;&lt;/span&gt;
        &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;runat&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;asp:ContentPlaceHolder&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then you&amp;#39;l l end up with something like this&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img width="452" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher/2LevelMenu.jpg" alt="2 Level Menu" height="44" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cs.vbcity.com/aggbug.aspx?PostID=45" width="1" height="1"&gt;</content><author><name>skullcrusher</name><uri>http://cs.vbcity.com/members/skullcrusher/default.aspx</uri></author><category term="Moss" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Moss/default.aspx" /><category term="SharePoint" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/SharePoint/default.aspx" /><category term="Navigation" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Navigation/default.aspx" /></entry><entry><title>Set SharePoint PeoplePicker Field mark 2</title><link rel="alternate" type="text/html" href="/blogs/skullcrusher/archive/2008/11/04/set-sharepoint-peoplepicker-field-mark-2.aspx" /><id>/blogs/skullcrusher/archive/2008/11/04/set-sharepoint-peoplepicker-field-mark-2.aspx</id><published>2008-11-03T16:43:00Z</published><updated>2008-11-03T16:43:00Z</updated><content type="html">&lt;p&gt;Here&amp;#39;s&amp;nbsp; an updated version of my PeoplePicker filling script that now uses the position of the&amp;nbsp; people picker rather&amp;nbsp;than&amp;nbsp;the field name to&amp;nbsp;allow you to&amp;nbsp;fill multiple people pickers easily.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note : If you tried my code &amp;amp; couldn&amp;#39;t get it to work, it&amp;#39;s because square brackets weren&amp;#39;t displaying on this site so I&amp;#39;ve had to put&amp;nbsp;a space after the integer when getting the value from the array&amp;nbsp;to get it to show here.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;script type=&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&amp;gt;
_spBodyOnLoadFunctionNames.&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;push&lt;/span&gt;(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;fillDefaultValues&amp;quot;&lt;/span&gt;);


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;function&lt;/span&gt; fillDefaultValues()
{
    &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//fill the  first people picture&lt;/span&gt;
 fillPeoplePickerWithCurrentUser(1);
 &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//fill th esecond people picker&lt;/span&gt;
 fillPeoplePickerWithCurrentUser(2);
}


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;function&lt;/span&gt; fillPeoplePickerWithCurrentUser(pickerNo)
{
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; currentUser &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; getCurrentUser();


 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt;(currentUser !&lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; null)
 {
  &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; pp &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; getPickerImputElement(pickerNo);
  
  &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt;(pp !&lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; null)
  {
   pp.innerHTML &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; currentUser;
  }
 }
}



&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;function&lt;/span&gt; getPickerImputElement(pickerNo)
{
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; result &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &amp;#39;&amp;#39;;
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; divs &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; document.getElementsByTagName(&amp;#39;DIV&amp;#39;);
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; j &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; 0;


 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;for&lt;/span&gt;(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; i=0; i &amp;lt; divs.&lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;length&lt;/span&gt;; i++)
 {
  &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt;(divs[i ].id.&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;indexOf&lt;/span&gt;(&amp;#39;UserField_upLevelDiv&amp;#39;) &amp;gt; 0)
  {
   j++;
   
   &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt;(j == pickerNo)
   {
    result &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; divs[i ];
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;break&lt;/span&gt;;
   }
  }
 }
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; result;
}


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;function&lt;/span&gt; getCurrentUser()
{
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; tags &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; document.getElementsByTagName(&amp;#39;a&amp;#39;);
 &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;for&lt;/span&gt;(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;var&lt;/span&gt; i=0; i &amp;lt; tags.&lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;length&lt;/span&gt;; i++)
 {
  &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt;(tags[i ].innerText.&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;substr&lt;/span&gt;(0,7) == &amp;#39;Welcome&amp;#39;)
   &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; tags[i ].innerText.&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;substr&lt;/span&gt;(8,tags[i ].innerText.&lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;length&lt;/span&gt;);
 }
}
&amp;lt;/script&amp;gt;


 &lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cs.vbcity.com/aggbug.aspx?PostID=24" width="1" height="1"&gt;</content><author><name>skullcrusher</name><uri>http://cs.vbcity.com/members/skullcrusher/default.aspx</uri></author><category term="SharePoint" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/SharePoint/default.aspx" /><category term="peoplepicker" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/peoplepicker/default.aspx" /></entry><entry><title>How to get wz_tooltip.js working in SharePoint</title><link rel="alternate" type="text/html" href="/blogs/skullcrusher/archive/2008/10/04/how-to-get-wz-tooltip-js-working-in-sharepoint.aspx" /><id>/blogs/skullcrusher/archive/2008/10/04/how-to-get-wz-tooltip-js-working-in-sharepoint.aspx</id><published>2008-10-04T06:11:00Z</published><updated>2008-10-04T06:11:00Z</updated><content type="html">&lt;p&gt;Came across an excellent javascript tooltip library by &lt;a target="_blank" href="http://www.walterzorn.com/tooltip/tooltip_e.htm" title="Walter Zorn" class="null"&gt;Walter Zorn&lt;/a&gt; that I thought would be a great additional to my SharePoint sites.&amp;nbsp; Unfortunately follow the instructions on his site would work fine in a normal Asp.Net app but not within the SharePoint environment.&lt;/p&gt;
&lt;p&gt;However I did eventually get it working when my grey matter kicked into gear and thought I better blog it quick before senility kicked in and I forgot it &lt;img src="http://cs.vbcity.com/emoticons/emotion-5.gif" alt="Wink" /&gt;&lt;/p&gt;
&lt;p&gt;Edit your master page and add a SharePoint:ScriptLink to the location of the wz_tooltip.js file i.e&lt;/p&gt;
&lt;p&gt;underneath &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SharePoint:ScriptLink&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;init.js&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;runat&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;add a new line with &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;SharePoint:ScriptLink&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;name&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;Skullcrusher/wz_tooltip.js&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;runat&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;obviously just change it to match your location.&lt;/p&gt;
&lt;p&gt;This unfortunately isn&amp;#39;t sufficient to get it working due to SharePoints quircks and I was getting &amp;quot;tt_aElt.0.style is null o not an object&amp;quot; errors.&amp;nbsp; This turned out to be due to the fact that the tooltip wasn&amp;#39;t getting initialized properly and there is a simple fix.&lt;/p&gt;
&lt;p&gt;All you need to do is add a call to tt_Init in the onload of the body i.e. change&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;body&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;body&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;onload&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;BLOCKED SCRIPT_spBodyOnLoadWrapper();&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:Maroon;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;body&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;body&amp;quot;&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;onload&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&amp;quot;BLOCKED SCRIPT_spBodyOnLoadWrapper();tt_Init();&amp;quot;&lt;/span&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And that&amp;#39;s it you can now use it in any SharePoint page.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cs.vbcity.com/aggbug.aspx?PostID=20" width="1" height="1"&gt;</content><author><name>skullcrusher</name><uri>http://cs.vbcity.com/members/skullcrusher/default.aspx</uri></author><category term="Moss" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Moss/default.aspx" /><category term="SharePoint" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/SharePoint/default.aspx" /><category term="Javascript" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Javascript/default.aspx" /></entry><entry><title>Get the Full user name in a web hosted InfoPath Form</title><link rel="alternate" type="text/html" href="/blogs/skullcrusher/archive/2008/09/26/get-the-full-user-name-in-a-web-hosted-infopath-form.aspx" /><id>/blogs/skullcrusher/archive/2008/09/26/get-the-full-user-name-in-a-web-hosted-infopath-form.aspx</id><published>2008-09-26T01:08:00Z</published><updated>2008-09-26T01:08:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;strong&gt;&lt;em&gt;&lt;span style="text-decoration:underline;"&gt;Copied from old blog December 2006&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Although you can easily get hold of the logged in users login name with&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;color:#0000ff;font-family:Times New Roman;"&gt;this&lt;/span&gt;&lt;span style="font-size:x-small;font-family:Times New Roman;"&gt;.Application.User.LoginName&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;it&amp;#39;s doesn&amp;#39;t seem to be so easy to get hold of the users full name. It is however releatively easy to accomplish by making a call to one of the many webservices provided by MOSS, specifically the GetUserInfo method of the UserGroup webservice, which I&amp;#39;ll guide you through now. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;You&amp;#39;ll need to add the following class that I&amp;#39;ve created using the xsd.exe tool (it represents the details returned in the User node of the GetUserInfo Method) to your project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt; 


&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//------------------------------------------------------------------------------&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// &lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//     This code was generated by a tool.&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//     Runtime Version:2.0.50727.42&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//     Changes to this file may cause incorrect behavior and will be lost if&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//     the code is regenerated.&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// &lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//------------------------------------------------------------------------------&lt;/span&gt;


&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;using&lt;/span&gt; System.Xml.Serialization;


&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// This source code was auto-generated by xsd, Version=2.0.50727.42.&lt;/span&gt;
&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//&lt;/span&gt;
[System.CodeDom.Compiler.GeneratedCodeAttribute(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;xsd&amp;quot;&lt;/span&gt;, &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;2.0.50727.42&amp;quot;&lt;/span&gt;)]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;code&amp;quot;&lt;/span&gt;)]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;true&lt;/span&gt;)]
[System.Xml.Serialization.XmlRootAttribute(Namespace &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;http://schemas.microsoft.com/sharepoint/soap/directory/&amp;quot;&lt;/span&gt;, IsNullable &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;false&lt;/span&gt;)]
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; partial &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;class&lt;/span&gt; User {


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; idField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; sidField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; nameField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; loginNameField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; emailField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; notesField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; isSiteAdminField;


    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; isDomainGroupField;


    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; ID {
        get {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.idField;
        }
        set {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.idField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; Sid {
        get {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.sidField;
        }
        set {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.sidField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; Name {
        get {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.nameField;
        }
        set {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.nameField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; LoginName {
        get {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.loginNameField;
        }
        set {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.loginNameField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; Email {
        get {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.emailField;
        }
        set {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.emailField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; Notes {
        get {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.notesField;
        }
        set {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.notesField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; IsSiteAdmin {
        get {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.isSiteAdminField;
        }
        set {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.isSiteAdminField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }


    [System.Xml.Serialization.XmlAttributeAttribute()]
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;string&lt;/span&gt; IsDomainGroup {
        get {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.isDomainGroupField;
        }
        set {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.isDomainGroupField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; value;
        }
    }
}&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;/span&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;You&amp;#39;ll also need to set the forms security level to Full Trust. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Now we need to create the data connection to the web service.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Click Data -&amp;gt; Data Connections&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;img width="431" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/DataConn.gif" height="432" alt="" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Click Add&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&amp;nbsp;&lt;img border="0" width="630" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/NewConn.gif" height="429" style="border:0;" alt="" /&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Select Create a new connection to Receive data then click Next &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;img border="0" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/Source.gif" style="border:0;" alt="" /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Select Web service then click Next &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;img border="0" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/WSdetails.gif" style="border:0;" alt="" /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Enter http://YourServerName/_vti_bin/UserGroup.asmx for the webservice location making sure you put in your moss servers name then click next &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;img border="0" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/Operation.gif" style="border:0;" alt="" /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Select GetUserInfo from the list of available operations then click Next &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;img border="0" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/SampleValue.gif" style="border:0;" alt="" /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Infopath needs to get more info from the webservice operation which means you&amp;#39;ll have to provide a valid Login name for it to query the webservice with, so click on the Set Sample Value button &amp;amp; input a user in the following format Domain\Login&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&amp;nbsp;&lt;img border="0" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/Parameter.gif" style="border:0;" alt="" /&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Click OK then click Next &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;img border="0" width="630" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/CParam.gif" height="429" style="border:0;" alt="" /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Click Next &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;img border="0" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/Store.gif" style="border:0;" alt="" /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Click Next &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;img border="0" width="630" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/Finish.gif" height="429" style="border:0;" alt="" /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Enter a meaningful name for the data connection &amp;amp; ensure you &lt;b&gt;remove&lt;/b&gt; the tick from Automatically retrieve data when the form is opened. Then click Finish &amp;amp; close the data connections window. Within your form code you can now add the using directive to System.Xml.Serialization &amp;amp; the following to the formloading event to retrieve the UserInfo details &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre style="background-color:#f2f2f2;border:solid 1px #e5e5e5;width:100%;vertical-align:top;line-height:normal;overflow-x:auto;white-space:pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; InternalStartup()
        {
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.EventManager.FormEvents.Loading += &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; LoadingEventHandler(FormEvents_Loading);
        } 


        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; FormEvents_Loading(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;object&lt;/span&gt; sender, LoadingEventArgs e)
        {
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//get hold of the datasource for the webservice operation&lt;/span&gt;
            DataSource ds &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.DataSources[&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;GetUserInfo&amp;quot;&lt;/span&gt;];
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//Create an XPathNavigator to the node we have to set to query the method&lt;/span&gt;
            XPathNavigator userField &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; ds.CreateNavigator().SelectSingleNode(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;/dfs:myFields/dfs:queryFields/tns:GetUserInfo/tns:userLoginName&amp;quot;&lt;/span&gt;, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.NamespaceManager);
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//Set the query value to the current users login name&lt;/span&gt;
            userField.SetValue(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.Application.User.LoginName);
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//execute the webservice operation&lt;/span&gt;
            ds.QueryConnection.Execute();


            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//the data will now be in the datasource&lt;/span&gt;
            XPathNavigator userInfo &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.DataSources[&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;GetUserInfo&amp;quot;&lt;/span&gt;].CreateNavigator();
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//add the namespaces so we can query the datasource&lt;/span&gt;
            XmlNamespaceManager umanager &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; XmlNamespaceManager(userInfo.NameTable);
            umanager.AddNamespace(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;dfs&amp;quot;&lt;/span&gt;, &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&lt;/span&gt;);
            umanager.AddNamespace(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;tns&amp;quot;&lt;/span&gt;, &lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;http://schemas.microsoft.com/sharepoint/soap/directory/&amp;quot;&lt;/span&gt;);
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//get hold of the node we&amp;#39;re after&lt;/span&gt;
            XPathNavigator usernode &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; userInfo.SelectSingleNode(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetUserInfoResponse/tns:GetUserInfoResult/tns:GetUserInfo/tns:User&amp;quot;&lt;/span&gt;, umanager);
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//deserialize the contents of the node into our custom class&lt;/span&gt;
            User user;
            XmlSerializer serializer &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; XmlSerializer(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;typeof&lt;/span&gt;(User));
            user &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (User)serializer.Deserialize(usernode.ReadSubtree()); 


            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//set the value of a field within out main data source i.e. the InfoPath form&lt;/span&gt;
            &lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;//to the users full name&lt;/span&gt;
            XPathNavigator field &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.MainDataSource.CreateNavigator().SelectSingleNode(&lt;span style="color:#666666;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;quot;/my:myFields/my:field1&amp;quot;&lt;/span&gt;, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.NamespaceManager);
            field.SetValue(user.Name);
        }&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size:small;font-family:Arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;/span&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;and voila! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;img border="0" src="http://cs.vbcity.com/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/skullcrusher.FullUserName/FinalResult.gif" style="border:0;" alt="" /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;If you take a look at the User class you&amp;#39;ll notice that there&amp;#39;s other information available to you from the GetUserInfo method. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;font-family:Verdana,Arial,Helvetica,sans-serif;"&gt;Hope this information is useful to someone &amp;amp; saves them some time trying to figure this one out. &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cs.vbcity.com/aggbug.aspx?PostID=11" width="1" height="1"&gt;</content><author><name>skullcrusher</name><uri>http://cs.vbcity.com/members/skullcrusher/default.aspx</uri></author><category term="InfoPath" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/InfoPath/default.aspx" /><category term="Moss" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/Moss/default.aspx" /><category term="SharePoint" scheme="http://cs.vbcity.com/blogs/skullcrusher/archive/tags/SharePoint/default.aspx" /></entry></feed>