<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.rightpoint.com/community/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Viewpoint : SharePoint 2007</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx</link><description>Tags: SharePoint 2007</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Debug Build: 31106.3070)</generator><item><title>Chicago SharePoint Business Strategies User Group Presentation: Intro to CQWP</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2012/02/20/chicago-sharepoint-business-strategies-user-group-presentation-intro-to-cqwp.aspx</link><pubDate>Mon, 20 Feb 2012 17:14:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2930</guid><dc:creator>Kim Frehe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2930</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2012/02/20/chicago-sharepoint-business-strategies-user-group-presentation-intro-to-cqwp.aspx#comments</comments><description>&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;I was honored to give a presentation at the February 2012 &lt;/span&gt;&lt;a href="http://www.meetup.com/Sharepoint/"&gt;&lt;span style="font-family:Calibri;color:#0000ff;font-size:small;"&gt;Chicago Microsoft SharePoint Business Strategies User Group&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt; meeting.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;It was a great group and I had a lot of fun talking about my favorite subject, SharePoint, and my favorite web part, the 2010 Content Query Web Part (CQWP).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Calibri;font-size:small;"&gt;A few attendees asked for the slides so I thought I&amp;rsquo;d post them here for everyone.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;The notes view will show you my some of my comments, and the examples should be self-explanatory.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;If not, please feel free to let me know at &lt;/span&gt;&lt;a href="mailto:kfrehe@rightpoint.com"&gt;&lt;span style="font-family:Calibri;color:#0000ff;font-size:small;"&gt;kfrehe@rightpoint.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:small;"&gt;To summarize, the CQWP is a powerful tool that SharePoint provides, out of the box, to give you access to information across your site collection.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;The CQWP collects information and displays it for you in one web part on a page, where you can then group, filter and sort the information in a meaningful way.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:small;"&gt;This presentation: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;span style="font-size:small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;span style="font-size:small;"&gt;&amp;middot;&lt;/span&gt;&lt;span style="font:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;Gives a high level overview of what the CQWP is, &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;span style="font-size:small;"&gt;&amp;middot;&lt;/span&gt;&lt;span style="font:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;Shows some examples of how we have used the CQWP internally and on some of our projects, &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;span style="font-size:small;"&gt;&amp;middot;&lt;/span&gt;&lt;span style="font:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;Includes print screens with descriptions of adding a web part to a page,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;span style="font-size:small;"&gt;&amp;middot;&lt;/span&gt;&lt;span style="font:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;Provides requirements for having access to create and use CQWP&amp;rsquo;s,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast"&gt;&lt;span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;span style="font-size:small;"&gt;&amp;middot;&lt;/span&gt;&lt;span style="font:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;Offers some tips and tricks for using the CQWP.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;a target="_blank" href="https://skydrive.live.com/redir.aspx?cid=9933e5e5dceba3f8&amp;amp;resid=9933E5E5DCEBA3F8!105&amp;amp;parid=root" title="Link to Presentation"&gt;Link to Presentation&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;Enjoy!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;
&lt;p class="MsoNormal"&gt;To join our next &lt;a href="http://www.meetup.com/Sharepoint/"&gt;&lt;span style="color:#0000ff;"&gt;Chicago Microsoft SharePoint Business Strategies User Group&lt;/span&gt;&lt;/a&gt; meeting, held on the 2&lt;sup&gt;nd&lt;/sup&gt; Tuesday of the month, please sign up at &lt;a href="http://www.meetup.com/sharepoint"&gt;&lt;span style="color:#0000ff;"&gt;http://www.meetup.com/sharepoint&lt;/span&gt;&lt;/a&gt; .&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;The topics change every month and are listed one month prior to the meeting date.&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Calibri;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2930" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Content+Management/default.aspx">Content Management</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/CQWP/default.aspx">CQWP</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Presentations/default.aspx">Presentations</category></item><item><title>SharePoint 2007 Timer Job Woes</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2011/11/08/sharepoint-2007-timer-job-woes.aspx</link><pubDate>Tue, 08 Nov 2011 21:54:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2908</guid><dc:creator>Jeremy Williams</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2908</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2011/11/08/sharepoint-2007-timer-job-woes.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Scenario: &lt;/strong&gt;You realize one day that you are no longer receiving alerts from SharePoint.&amp;#160; Upon investigation, you notice that you can create a new alert and receive the notification email that an alert has been created for you.&amp;#160; However, you receive no notification emails after the first one is sent for that particular alert.&amp;#160; Upon further investigation, you discover that no timer jobs have been executed in a couple of days.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution One:&lt;/strong&gt; Thinking that it’s the typical case of a dead SharePoint Timer Job, you go and restart the SharePoint Timer Job Service.&amp;#160; After restarting the windows service, waiting patiently, (and impatiently running stsadm –o execadmsvcjobs) you realize that this isn’t the problem, so you continue to …&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution Two:&lt;/strong&gt; You decide to attempt clearing the Timer Job cache directory on the SharePoint server…This is better documented at &lt;a href="http://blogs.msdn.com/b/josrod/archive/2007/12/12/clear-the-sharepoint-configuration-cache-for-timer-job-and-psconfig-errors.aspx"&gt;Joe Rodgers Blog&lt;/a&gt;.&amp;#160; Essentially, you navigate to the All Users/Program Data directories, and clear out the files in the SharePoint—&amp;gt;Config—&amp;gt;GUID folder, then restart the timer service and wait for it to rebuild (and execute) all of the files.&amp;#160; After going through the same patient waiting, you (sadly) realize that this didn’t fix the issue either.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Sanity Check: &lt;/strong&gt;Go through all of your service accounts and their related services and make sure that they are: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Running &lt;/li&gt;    &lt;li&gt;Running under the correct Identity &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;After going through your Sanity Check, try the first two solutions…just to make sure you aren’t going crazy (after all, it’s possible)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Safety-First: &lt;/strong&gt;Now you’re (probably) starting to get a bit nervous about the overall health of your SharePoint 2007 Server (and depending on how many users are angry at you, you might be nervous about your own health)…&amp;#160; Before proceeding, take a deep breath and MAKE SURE YOU HAVE BACKUPS.&amp;#160; I don’t care if you need to call up your off-site tape storage people and have them make an emergency delivery…get those backups!! [It’ll be the cheapest insurance you’ve ever not-paid-for]&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Big Hammer Solution: &lt;/strong&gt;You’re going to be running the SharePoint Products and Technologies Configuration Wizard…This will (effectively and hopefully) clean up whatever issue you were having in your environment this whole time.&amp;#160; Remember that running this will take SharePoint offline in a BIG way (for a minimum of 5 minutes, and with no conceivable upper-bound).&amp;#160; Once you’re ready, go ahead and launch the application from start…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;…Hiccup 1:&lt;/strong&gt;&amp;#160; You’re presented with the following error message, “unable to upgrade SharePoint products and technologies because an upgrade is already in progress”.&amp;#160; Of course, that’s quite annoying, but don’t worry the fix is relatively straightforward [note:&lt;em&gt; my steps&lt;/em&gt; below are modified from those presented here: &lt;a href="http://blogs.technet.com/b/manjesh/archive/2009/11/10/unable-to-run-sharepoint-configuration-wizard-error-unable-to-upgrade-sharepoint-products-and-technologies-because-an-upgrade-is-already-in-progress.aspx"&gt;http://blogs.technet.com/b/manjesh/archive/2009/11/10/unable-to-run-sharepoint-configuration-wizard-error-unable-to-upgrade-sharepoint-products-and-technologies-because-an-upgrade-is-already-in-progress.aspx&lt;/a&gt;]&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Stop the Windows SharePoint Services Timer service. &lt;/li&gt;    &lt;li&gt;On the SharePoint Server where Central Administration Site is hosted browse to C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\&amp;lt;guid&amp;gt; &lt;/li&gt;    &lt;li&gt;Move all the xml files to another location. &lt;/li&gt;    &lt;li&gt;Also backup the cache.ini file. Then Edit the cache.ini and replace the current value with &amp;quot;1&amp;quot;. &lt;/li&gt;    &lt;li&gt;Restart the Windows SharePoint Services Timer service. New xml files will start appearing in the guid folder. &lt;/li&gt;    &lt;li&gt;Verify the cache.ini now contains its previous value (or verify that the value is no longer &amp;quot;1&amp;quot;; any non-1 value is fine). &lt;/li&gt;    &lt;li&gt;Run the command from the sharepoint server &amp;quot;stsadm -o setproperty -pn command-line-upgrade-running -pv no&amp;quot; (without quotes) &lt;/li&gt;    &lt;li&gt;Run the command from the sharepoint server &amp;quot;stsadm -o execadmsvcjobs&amp;quot; (without quotes) &lt;/li&gt;    &lt;li&gt;&lt;em&gt;Open up Central Administration and Navigate to Timer Job Status (under Operations).&amp;#160; Look for a One-Time job of ‘Upgrade Job’.&amp;#160; If you find it, delete it.&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;&lt;em&gt;Run SharePoint Products and Technologies &lt;/em&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Big Hammer Solution (cont’d): &lt;/strong&gt;Alright, so now your SharePoint server is running through it’s paces on the upgrade/configuration…&amp;#160; Step 8 will probably be the longest step in the world…so go grab some coffee, relax, etc…&amp;#160; If it seems that it’s hanging on Step 8, you can run this command from the command prompt.&amp;#160; The (following) command will effectively cancel your previous upgrade efforts, and will restart everything.&amp;#160; Once you execute this command, it’s best to step away and stop looking at the system…You’ll only serve to drive yourself a bit mad.&amp;#160; After (what could very well be a few hours) the job will complete and your farm should (once again) be in a sustainable, and running state.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;psconfig -cmd upgrade -inplace b2b -wait -force&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Validating it all worked: &lt;/strong&gt;Go ahead and check your Timer job to make sure that it’s executing jobs now…Assuming that it is, you can go ahead and make sure that your Alerts are working again too.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Phew!&amp;#160; I’m glad that’s over…Now what the FLIP happened?!?!?!&lt;/strong&gt;&amp;#160; In the particular case that I’m walking through above, there were a couple of factors at play…&amp;#160; There was a SQL server failure, service account identity changes, and a previous upgrade (service pack/cumulative update) that appeared to never have completed…&amp;#160; By running SharePoint Products and Technologies Configuration Wizard (psconfig), we allowed SharePoint to recompile (read: recompose) itself a bit, and also execute the upgrade job properly.&amp;#160; Once this job was able to complete, the timer job had the ability to execute jobs as designed.&amp;#160; &lt;/p&gt;  &lt;p&gt;And yes, I realize that I didn’t actually answer what happened here, since I’m not terribly sure of the actual root cause.&amp;#160; A service pack/CU package may have been halted mid-way, or perhaps SQL went offline during a patching window, or perhaps the gremlins that run SharePoint were just a bit angry the particular day this all went down.&amp;#160; However, the solution above &lt;em&gt;should&lt;/em&gt; help anyone in a similar situation, since the issues encountered represent some fairly serious SharePoint issues…&amp;#160; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2908" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/How+it+Works/default.aspx">How it Works</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Timer+Jobs/default.aspx">Timer Jobs</category></item><item><title>Sharepoint Online for Office 365: People Search using SPServices and jQuery</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2011/07/13/sharepoint-online-for-office-365-people-search-using-spservices-and-jquery.aspx</link><pubDate>Wed, 13 Jul 2011 21:44:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2870</guid><dc:creator>Jarrod Godfrey</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2870</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2011/07/13/sharepoint-online-for-office-365-people-search-using-spservices-and-jquery.aspx#comments</comments><description>&lt;p&gt;One of my recent projects involved creating a custom web part for SharePoint Online (part of the Office 365 suite). Unfortunately, one of the limitations of developing for the cloud is that you’re bound to a sandboxed solution environment. This particular project required retrieving data from the User Profile Service using the following SharePoint web service: &lt;/p&gt;  &lt;p&gt;1.) Query Web Service&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee872313.aspx"&gt;http://msdn.microsoft.com/en-us/library/ee872313.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, if I were not limited to a sandboxed environment my first approach would be to use the SharePoint object model.&amp;#160; In the sandbox, however, we are limited to the Microsoft.SharePoint.dll and any assemblies which include the attribute: “AllowPartiallyTrustedCallersAttribute” as outlined here: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee539417(office.14).aspx"&gt;http://msdn.microsoft.com/en-us/library/ee539417(office.14).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My solution….. use the SPServices library to make the web service calls from the client side.&lt;/p&gt;  &lt;p&gt;SPServices is a jQuery library that wraps SharePoint’s Web Services calls using the .ajax() method behind the scenes, I would recommend to anyone reading this blog post to check out their web site for more information. I found the library very easy to use and their site is full of good documentation.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://spservices.codeplex.com/"&gt;http://spservices.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Before using the SPServices library, you’ll have to download the jquery.SPServices-0.6.1.js and save it to an accessible location (for this example I added “jquery.SPServices-0.6.1.js” to the SharePoint Site Assets folder on my site) and use the following reference: &lt;/p&gt;  &lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &amp;lt;script language=&lt;span style="color:#006080;"&gt;&amp;quot;javascript&amp;quot;&lt;/span&gt; type=&lt;span style="color:#006080;"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span style="color:#006080;"&gt;&amp;quot;https://Server_Name/sites/Your_Site_Name/SiteAssets/Scripts/jquery.SPServices-0.6.1.js&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The best thing about SPServices is that it does all of the heavy lifting for you, saving you the time of coding the Ajax calls and constructing the SOAP envelope.&lt;/p&gt;

&lt;p&gt;For an outline of the ‘general syntax’ of the SPServices function I used, refer to the following link:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices&amp;amp;referringTitle=%24%28%29.SPServices&amp;amp;ANCHOR#GeneralSyntax"&gt;http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices&amp;amp;referringTitle=%24%28%29.SPServices&amp;amp;ANCHOR#GeneralSyntax&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Lets take a look at how I used the SPServices function:&lt;/p&gt;

&lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; $().SPServices({&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt;     operation: &lt;span style="color:#006080;"&gt;&amp;quot;Query&amp;quot;&lt;/span&gt;,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;     async: &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;     queryXml: query,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;     completefunc: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; (xData, Status) {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;         xmlProfileResponse = xData.responseXML.xml;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;     }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt; });&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Every Web Service call will follow a similar structure with different parameters according to the operation.&amp;#160; For example, if you look at line 2 from the snippet above, the ‘operation’ parameter is set to “Query” which indicates to the library that it will be calling the Query Web Service.&amp;#160; On line 5, ‘completefunc’ accepts a reference to the callback function that should be executed upon completion of the Web Service call.&amp;#160; For this example, I’m setting the response XML to a variable, ‘xmlProfileResponse’ and then parsing it later.&amp;#160; Finally, the ‘queryXml’ parameter on&amp;#160; line 4 is where the search criteria is defined. Here is the query itself: &lt;/p&gt;

&lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; query = &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;utf-8\&amp;quot; ?&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;QueryPacket xmlns=\&amp;quot;urn:Microsoft.Search.Query\&amp;quot; Revision=\&amp;quot;1000\&amp;quot;&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;Query domain=\&amp;quot;QDomain\&amp;quot;&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;SupportedFormats&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;Format&amp;gt;urn:Microsoft.Search.Response.Document.Document&amp;lt;/Format&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;/SupportedFormats&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;Context&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;QueryText language=\&amp;quot;en-US\&amp;quot; type=\&amp;quot;MSSQLFT\&amp;quot;&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;SELECT AccountName, Department, WorkId, Description, PreferredName, LastName, Title, Path, MobilePhone FROM SCOPE() WHERE &amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;quot;(\&amp;quot;DAV:contentclass\&amp;quot; = &amp;#39;urn:content-class:SPSPeople&amp;#39;) &amp;quot;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt;                      + &lt;span style="color:#006080;"&gt;&amp;quot; AND (\&amp;quot;LASTNAME\&amp;quot; LIKE &amp;#39;%&amp;quot;&lt;/span&gt; + lastName + &lt;span style="color:#006080;"&gt;&amp;quot;%&amp;#39;)&amp;quot;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;/QueryText&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;/Context&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;/Query&amp;gt;&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt;         + &lt;span style="color:#006080;"&gt;&amp;#39;&amp;lt;/QueryPacket&amp;gt;&amp;#39;&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;As you can see, it’s a straight forward query. In line 11 above I’m filtering by lastName. Notice that each of the values in the Select clause (line 9) come from the User Profile Service’s default fields. The scope is defined by line 10, SPSPeople.&lt;/p&gt;

&lt;p&gt;The next step was parsing the results. I chose to parse on the client side by using jQuery and some simple javascript:&lt;/p&gt;

&lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; ParseXML(xml) {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; nameElement;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;  &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;     $(xml).find(&lt;span style="color:#006080;"&gt;&amp;quot;Properties&amp;quot;&lt;/span&gt;).each(&lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; oPerson = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Person();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;         $(xml).find(&lt;span style="color:#006080;"&gt;&amp;quot;Property&amp;quot;&lt;/span&gt;).each(&lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;             nameElement = $(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;).find(&lt;span style="color:#006080;"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;).text();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (nameElement == &lt;span style="color:#006080;"&gt;&amp;quot;PREFERREDNAME&amp;quot;&lt;/span&gt;) {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;                 oPerson.preferredName = $(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;).find(&lt;span style="color:#006080;"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;).text();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;             } &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (nameElement == &lt;span style="color:#006080;"&gt;&amp;quot;LASTNAME&amp;quot;&lt;/span&gt;) {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;                     oPerson.lastName = $(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;).find(&lt;span style="color:#006080;"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;).text();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt;                 } &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt;                     &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (nameElement == &lt;span style="color:#006080;"&gt;&amp;quot;TITLE&amp;quot;&lt;/span&gt;) {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt;                         oPerson.title = $(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;).find(&lt;span style="color:#006080;"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;).text();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum16"&gt;  16:&lt;/span&gt;                     } &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum17"&gt;  17:&lt;/span&gt;                         &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (nameElement == &lt;span style="color:#006080;"&gt;&amp;quot;PATH&amp;quot;&lt;/span&gt;) {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum18"&gt;  18:&lt;/span&gt;                             oPerson.path = $(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;).find(&lt;span style="color:#006080;"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;).text();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum19"&gt;  19:&lt;/span&gt;                         } &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum20"&gt;  20:&lt;/span&gt;                             &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (nameElement == &lt;span style="color:#006080;"&gt;&amp;quot;MOBILEPHONE&amp;quot;&lt;/span&gt;) {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum21"&gt;  21:&lt;/span&gt;                                 oPerson.workPhone = $(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;).find(&lt;span style="color:#006080;"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;).text();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum22"&gt;  22:&lt;/span&gt;                             } &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum23"&gt;  23:&lt;/span&gt;                                 &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (nameElement == &lt;span style="color:#006080;"&gt;&amp;quot;ACCOUNTNAME&amp;quot;&lt;/span&gt;) {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum24"&gt;  24:&lt;/span&gt;                                     accountName = $(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;).find(&lt;span style="color:#006080;"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;).text();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum25"&gt;  25:&lt;/span&gt;                                 } &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt; {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum26"&gt;  26:&lt;/span&gt;                                     &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (nameElement == &lt;span style="color:#006080;"&gt;&amp;quot;DEPARTMENT&amp;quot;&lt;/span&gt;) {&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum27"&gt;  27:&lt;/span&gt;                                         oPerson.department = $(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;).find(&lt;span style="color:#006080;"&gt;&amp;quot;Value&amp;quot;&lt;/span&gt;).text();&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum28"&gt;  28:&lt;/span&gt;                                     }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum29"&gt;  29:&lt;/span&gt;                                 }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum30"&gt;  30:&lt;/span&gt;                             }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum31"&gt;  31:&lt;/span&gt;                         }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum32"&gt;  32:&lt;/span&gt;                     }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum33"&gt;  33:&lt;/span&gt;                 }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum34"&gt;  34:&lt;/span&gt;             }&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum35"&gt;  35:&lt;/span&gt;         });&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum36"&gt;  36:&lt;/span&gt;     });&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:white;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum37"&gt;  37:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; oPerson;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;background-color:#f4f4f4;margin:0em;border-left-style:none;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;border-right-style:none;font-size:8pt;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum38"&gt;  38:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;I’m adding the values of the XML response to an object (oPerson), then returning the object and posting back server side (which I’ve omitted).&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;When working in the sandbox it can be frustrating at times because of all the limitations. However,&amp;#160; as you can see this is a very simple technique that allows developers to retrieve data from the User Profile Service despite the limitations of the SharePoint Sandboxed environment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2870" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/.NET/default.aspx">.NET</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Rightpoint/default.aspx">Rightpoint</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Ajax/default.aspx">Ajax</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Development/default.aspx">Development</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Blog/default.aspx">Blog</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Blogs/default.aspx">Blogs</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/search/default.aspx">search</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/ASMX/default.aspx">ASMX</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/jQuery/default.aspx">jQuery</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/O365/default.aspx">O365</category></item><item><title>Full Content Databases Causing Random COM Exceptions in SharePoint 2007</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/12/02/full-content-databases-causing-random-com-exceptions-in-sharepoint-2007.aspx</link><pubDate>Fri, 03 Dec 2010 01:48:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2823</guid><dc:creator>Chris Domino</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2823</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/12/02/full-content-databases-causing-random-com-exceptions-in-sharepoint-2007.aspx#comments</comments><description>&lt;p class="Text"&gt;Aw man it&amp;#39;s been a while! My latest project is in full swing, placing me in that doldrum-ish phase when all the new/fun stuff has been figured out and I&amp;#39;m left with coding through the minutia of the requirements. Between that, playing with my new Windows Phone 7 (which is simply exquisite), and working on a pet project on the side, I haven&amp;#39;t had much time to write. &lt;/p&gt;
&lt;p class="Text"&gt;As I attack my blog backlog, I&amp;#39;ll start with one of interesting discoveries made not by solely by me, but with the guidance and wisdom of my handsome project manager, Matt Schaub, who is this person: &lt;/p&gt;
&lt;p class="Text"&gt;
&lt;p class="Image"&gt;&lt;img src="http://chrisdomino.com/content/images/Full-Content-Databases-Causing-Random-COM-Exceptions-in-SharePoint-2007/WP-000017.jpg" class="Image" alt="" /&gt;&lt;/p&gt;
&lt;/p&gt;
&lt;p class="Text"&gt;We got a call from our client that they were seeing random errors on the site. Pouring into the ULS logs, we saw not only crazy COM exceptions in general, but specifically, in corners of our code base that had NEVER blown up. Imagine my panic: this is New Balance&amp;#39;s intranet! My baby! Over the months of building and testing, we had scrutinously beaten the application into submission at every possible breaking point. There is no way some new logical unhappy path was discovered that eluded our QA efforts and suddenly brought the site to its digital knees! &lt;/p&gt;
&lt;p class="Text"&gt;My contribution to this resolution was noticing that all of the exceptions (and like I said, these were random COM exceptions: different &amp;quot;HResult&amp;quot; codes and meaningless stack traces) were pursuant to code that made updates across the API. It was Matt who suggested that I take a look at the content database. As a good SharePoint architect, I knew to pretend that the content database didn&amp;#39;t exist; I never thought to look anywhere near the database server. &lt;/p&gt;
&lt;p class="Text"&gt;But out of options, I obliged him, as you should always do when your PM adoringly offers technical advice. I logged in, and immediately saw that the hard drive on which SQL stored its data on had only a few scarce kilobytes free; the transaction logs were bloated and went into a post-Thanksgiving-like food coma. &lt;/p&gt;
&lt;p class="Text"&gt;Fortunately, SharePoint is smart enough to understand such a situation and put itself into &amp;quot;read only&amp;quot; mode, keeping the site up and running, but disallowing updates (or anything that could potentially increase the size of the database any further). It had the same behavior as if you explicitly marked the database as read only via SQL Server&amp;#39;s Management Studio. &lt;/p&gt;
&lt;p class="Text"&gt;So we called New Balance back, and set their DBAs loose on the problem. They truncated the transaction log (turns out the My Sites web application was the culprit, not our app), and configured some other settings to disallow any further unchecked expansion. As soon as the hard drive was freed up, the database was happy, and so was our site. &lt;/p&gt;
&lt;p class="Text"&gt;This was one of those things that was amazingly absent from Bing; how has no one beaten me to this blog topic? Either we were doing was no heinous that it is embarrassing to share it with the world, or I simply wasn&amp;#39;t searching well enough. Either way, I hope this saves you from the panic that ensued with us! &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2823" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category></item><item><title>The Truth About How Daily SharePoint Alerts Actually Work</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/08/26/the-truth-about-how-daily-sharepoint-alerts-actually-work.aspx</link><pubDate>Thu, 26 Aug 2010 17:26:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2817</guid><dc:creator>Chris Domino</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2817</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/08/26/the-truth-about-how-daily-sharepoint-alerts-actually-work.aspx#comments</comments><description>&lt;p class="Text"&gt;A document changes. &lt;/p&gt;
&lt;p class="Text"&gt;An Email gets sent. &lt;/p&gt;
&lt;p class="Text"&gt;What could be easier? &lt;/p&gt;
&lt;p class="Text"&gt;Well, off the top of my head: open-heart surgery, underwater basket-weaving, and giraffe tooth-brushing to name a few things. SharePoint alerting architecture is a powerful communications tool that provides a convenient mechanism for users to consume information from around the site. &lt;/p&gt;
&lt;p class="Text"&gt;That is, if you don&amp;#39;t mess with them. &lt;/p&gt;
&lt;p class="Text"&gt;But of course, we are going to mess with them. We want to control the time, frequency, and appearance of the Emails. The default out-of-the-box settings work, but not quite well enough. All that my client wanted to do was simplify (&lt;span class="Italic"&gt;not&lt;/span&gt; go nuts, but &lt;span class="Italic"&gt;simplify &lt;/span&gt;) the standard digest (daily) Email template, and have the notifications shoot out at 9:00 AM. I estimated about a day to do this. &lt;/p&gt;
&lt;p class="Text"&gt;All we had to do was comment out some CAML from the alerttemplates.xml file (located in 12\TEMPLATE\XML) and run an STSADM command, right? Remove the links and columns that they didn&amp;#39;t want in the template, and set the time when alerts go out. RIGHT? &lt;/p&gt;
&lt;p class="Text"&gt;WRONG! &lt;/p&gt;
&lt;p class="Text"&gt;To make a story that is longer than it is interesting shorter and more interesting, we went from OOTB alerts to a custom template to a custom handler using &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.ialertnotifyhandler.aspx" class="Link"&gt;IAlertNotifyHandler&lt;/a&gt; to alerts not working for a month to users getting Email bombs of duplicate alerts. We went through three different solutions, two different Microsoft support representatives, and one scary spelunk into the SharePoint database. However, we came out safe and sound on the other side, with a cathartic clarity around how SharePoint daily alerts &lt;span class="Italic"&gt;actually&lt;/span&gt; work. It wasn&amp;#39;t a perfect outcome; there was quite a bit of drama, but a happy client is a happy client. &lt;/p&gt;
&lt;p class="Text"&gt;What I&amp;#39;m not going to do is take you through all the steps required to either customize an alert template, or wire up a code handler to build the Email from scratch (which is what I opted for, since alerttemplate.xml is 10,211 lines long and besides I really like writing code). Someone already did a good enough job of that &lt;a target="_blank" href="http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx" class="Link"&gt;here&lt;/a&gt;. &lt;/p&gt;
&lt;p class="Text"&gt;Instead, I want to provide a high level description of how SharePoint 2007 alerting infrastructure is put together. As I dug though the dumpsters of the Internet looking for any clues to this end, I heard a lot of rumors and false positives and frightening tales. I also came across a new golden nuggets, either from dependable sources, my own research, or the words from Microsoft&amp;#39;s mouth itself. So what I&amp;#39;m going to do is simply list out the pieces that work together to make alerts work, having already scrubbed out all the wrong turns I made while traversing down this path. &lt;/p&gt;
&lt;p class="Text"&gt;So here are the truths about daily alerts, in Q &amp;amp; A form... &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;Which timer job executes daily alerts?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;The &amp;quot;Immediate Alerts&amp;quot; job.&lt;br /&gt;&lt;br /&gt;&lt;span class="Underline"&gt;Wait isn&amp;#39;t that job that runs the immediate alerts?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;Yes. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;So the one job handles all alert notifications? &lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Yes. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;There is no &amp;quot;Daily Alerts&amp;quot; job? &lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;No. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;Promise? &lt;/span&gt;&lt;/p&gt;
&lt;p class="Text"&gt;Promise. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;Which server physically executes this job?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;Officially: All timer jobs run on all front end servers. So any web front end (or indexer, as I&amp;#39;ve seen) that has the proper assets deployed to it for a particular timer job (DLLs, XML files, etc.) can execute it successfully. Unofficially: not really; even though Central Administration -&amp;gt; Operations -&amp;gt; Timer Job Status &lt;span class="Italic"&gt;reports&lt;/span&gt; that the Immediate Alerts job runs on all servers, only one is actually doing the work. &lt;/p&gt;
&lt;p class="Text"&gt;To determine which one, you have to dive into the database. I know. It&amp;#39;s ugly; it hurts. Shush. Run the following query against the content database for your web application: &lt;/p&gt;
&lt;p class="Text"&gt;
&lt;table cellpadding="0" cellspacing="0" class="CodeLayout"&gt;
&lt;tbody&gt;
&lt;tr class="CodeRow"&gt;
&lt;td class="CodeCellTopLeft"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellTopMiddle"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellTopSpacer"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellTopRight"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="CodeRow"&gt;
&lt;td class="CodeCellMiddleLeft"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellMiddleMiddle"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellMiddleSpacer"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellMiddleRight"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="CodeRow"&gt;
&lt;td class="CodeCellMiddleLeft"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellMiddleMiddle"&gt;
&lt;div class="CodeContainer"&gt;
&lt;div class="CodeLayout"&gt;&lt;ol class="Code"&gt;
&lt;li class="Code" style="padding-left:0px;"&gt;&lt;span class="Code"&gt;&lt;span class="Keyword"&gt;SELECT &lt;/span&gt;&lt;span class="Operator"&gt;*&lt;/span&gt;&lt;span class="Keyword"&gt; FROM &lt;/span&gt;TimerLock&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td class="CodeCellMiddleSpacer"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellMiddleRight"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="CodeRow"&gt;
&lt;td class="CodeCellBottomLeft"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellBottomMiddle"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellBottomSpacer"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class="CodeCellBottomRight"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p class="Text"&gt;What this does is return the one and only row there will ever be from this table. The two columns are a name of a server, and a date. All we really care about is the name of the server: this is the one that&amp;#39;s going to do the notification work. If you want to change it to another server, stop the &amp;quot;Windows SharePoint Services Timer&amp;quot; service on this box, and wait for another server to jump in and acquire this lock. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;When do daily alerts get sent?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;OOTB, alerts are enabled, and the Immediate Alerts job runs every five minutes. What these runs do is ask the question: Are there any alerts that want to be sent out, but haven&amp;#39;t been? All alerts that answer &amp;quot;Yes!&amp;quot; get sent out. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;So how do daily alerts know that they want to be sent?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;Every alert has a time. For daily alerts, this time defaults to one day (or, more accurately, 24 hours) from the instant they are created. If you create an alert OOTB, you can select an hour on the UI, and the alert will be sent 24 hours from that time. In either case, this &amp;quot;Alert Time&amp;quot; is stored as a real, absolute time, not a &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.timespan.aspx" class="Link"&gt;TimeSpan&lt;/a&gt;. &lt;/p&gt;
&lt;p class="Text"&gt;So every time the Immediate Alerts job runs, it checks for alerts whose time is less than the current time. For each one, it fires the Email, and increments this time by another 24 hours. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;What about the job-immediate-alerts property?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;All this does is regulates how often the Immediate Alerts job runs. This has no effect if alerts are disabled (the &amp;quot;alerts-enabled&amp;quot; property is set to false). Remember, these properties are specific to a web application. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;And what about the job-daily-alerts property?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;The main purpose of this property is to confuse the hell out of everyone. This command has been deprecated since SharePoint 2003, but was never removed from the command line. &lt;/p&gt;
&lt;p class="Text"&gt;It has &lt;span class="Bold"&gt;NO&lt;/span&gt; effect. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;On anything?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Bold"&gt;NOTHING.&lt;/span&gt; Don&amp;#39;t ever think about it. Ever. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;So in summary?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;In summary, alerts store the &lt;span class="Italic"&gt;next&lt;/span&gt; time they want to be sent. Every execution of the Immediate Alerts timer job on the server that has acquired the &amp;quot;TimerLock&amp;quot; (for that content database) will send any daily alerts whose time is in the past. Finally, it will increment these times by 24 hours. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Underline"&gt;Anything else?&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;Now, there&amp;#39;s one other phenomena that I&amp;#39;ve observed with all this alert stuff: duplicates. And just duplications, but DUPLICATES - as many as a half dozen extra Emails per each unique notification. The most bizarre case we saw was when a user had an alert against a document library that saw five changes in one day, and he received five Emails: one with all five changes listed, one with only the first four, and so on, down to one Email advertising just one change. &lt;/p&gt;
&lt;p class="Text"&gt;What was causing the duplication? The prime suspect was of course the customization of the template, which, admittedly, had a bug, and was broken for some time: there were no alerts for weeks. But eventually I fixed it, and proved it by writing to the ULS logs each time the handler was invoked. And indeed, it was called exactly once for each Email the aforementioned user received. So why was one alert sending out so many notifications? &lt;/p&gt;
&lt;p class="Text"&gt;The most bizarre aspect of this problem was how it was solved, because it solved itself. It was as though the SharePoint alerting infrastructure had a cold: it got worse and worse, barfed, and then started to get better and better. Seriously. My user reported that he got fewer and fewer duplicates each day, until it completely worked itself out and only sent out one notification per alert; each Email containing a list of changes that that document library had experienced over those last 24 hours. &lt;/p&gt;
&lt;p class="Text"&gt;Of course this is unsettling; problems that solve themselves usually have the propensity to start themselves back up. I had a hunch, and I don&amp;#39;t blog about hunches. However, I will blog about hunches that Microsoft Premier Support endorses! &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Rant"&gt;&amp;lt;HUNCH&amp;gt;&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;First, a bit of background: there is another database table that people seem to get their hands dirty with when it comes to fixing alerts: EventCache. What from I can tell, this is the backlog of all changes made to all document libraries. We can then think of alerts as sort of queries into this table. Once an alert gobbles up a change, that change is marked as processed and won&amp;#39;t be alerted against again. &lt;/p&gt;
&lt;p class="Text"&gt;Therefore, a daily alert notification is actually the intersection of all unique changes that an alert (which is welded to a document library) &amp;quot;finds.&amp;quot; What happens if those changes in EventCache are never processed? They are dangling there, like icicles, waiting to melt back down to the ground. If alerts are broken, these changes seem to just stack up. &lt;/p&gt;
&lt;p class="Text"&gt;Eventually, when alerts are fixed, that stack will topple. It will be like unclogging a drain. However, that&amp;#39;s not what happened. The Email duplications diminished slowly, as if each alert could only pull changes from &lt;span class="Italic"&gt;one&lt;/span&gt; day at a time. In other words, the alert, when activated by the Immediate Alerts job, doesn&amp;#39;t seem to blindly ask EventCache for &amp;quot;all unprocessed changes for this document library&amp;quot; (as I would assume) but rather for &amp;quot;some 24 hour block of changes.&amp;quot; Maybe it&amp;#39;s that timeframe that gets out of whack, and changes from two different days are processed in the same batch. Or perhaps the logic is flawed, and times aren&amp;#39;t updated properly if the notification system is malfunctioning due to a bug somewhere in the template customization. &lt;/p&gt;
&lt;p class="Text"&gt;It still makes more sense to me that, once repaired, all notifications will be shot out in the next batch. Furthermore, I think it&amp;#39;s counterintuitive that &amp;quot;old&amp;quot; changes should be notified at all. If a user hooks up an alert, they want new information - new content. The apropos availability of old news isn&amp;#39;t new news. &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Rant"&gt;&amp;lt;/HUNCH&amp;gt;&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;Each day as the alerts were &amp;quot;worsening&amp;quot; and then &amp;quot;healing&amp;quot; themselves, my client user forward me all the Emails he got. So did another user, who only had one alert, and only got dups sometimes. The point is that there were no discernable patterns. I poured over the frequencies among alerts, number of Emails, and number of changes in each Email, but came up with nothing. I spent hours digging though verbose ULS logs, only to further validate that my custom handler was called exactly once per whatever it was that SharePoint was detecting as a notification. &lt;/p&gt;
&lt;p class="Text"&gt;When my Microsoft rep backed up the above hunch, I was encouraged, but not satisfied. Unfortunately, this remains a mystery to this day. Microsoft closed the case without any more discussion. My client closed the bug without any more discussion. It&amp;#39;s like everyone but is happy that this one little bug - which was only supposed to take a day to implement - has magically disappeared. &lt;/p&gt;
&lt;p class="Text"&gt;Well it&amp;#39;s time for me to join their ranks, as there is no more time, money, calories, or sanity to invest into the duplicate alert issue. Usually my posts have happy endings, but alerts are emo like that. If anyone out there has any ideas, please don&amp;#39;t hold back. Hopefully I was able to at least help a little bit in terms of cracking open the black box of enigmatic SharePoint 2007 daily alerts. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2817" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Alerts/default.aspx">Alerts</category></item><item><title>InfoPath Browser Enabled Forms and Crossing Web Applications</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/08/13/infopath-browser-enabled-forms-and-crossing-web-applications.aspx</link><pubDate>Fri, 13 Aug 2010 18:09:15 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2814</guid><dc:creator>Jeremy Williams</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2814</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/08/13/infopath-browser-enabled-forms-and-crossing-web-applications.aspx#comments</comments><description>&lt;h2&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: &lt;/h2&gt;  &lt;p&gt;A browser-enabled InfoPath form was to be built that allowed users to fill out a form, email it to themselves, attach a document to be uploaded to SharePoint, and then sent to an individual that understands SharePoint.&amp;#160; Sure, the easy answer here is to make the user upload the file directly and just classify it there.&amp;#160; The problem is that many users are unwilling to be trained on SharePoint, so this was elected as a compromise to fully utilizing SharePoint.&amp;#160; There’s some other border-cases that this form solves, but this is neither here nor there.&amp;#160; &lt;/p&gt;  &lt;h2&gt;&lt;strong&gt;Challenge&lt;/strong&gt;: &lt;/h2&gt;  &lt;p&gt;The form has a number of drop-downs in it, some are SharePoint ‘choice’ fields, and two are SharePoint ‘lookup’ fields.&amp;#160; The choice fields all function just fine since I’m using a nice little XML file to specify those dropdowns (they rarely change and it’s much quicker to load than querying all of the lists).&amp;#160; The lookup lists do need to be refreshed on each form load, since those are subject to additions.&amp;#160; However, InfoPath Browser forms have a nasty habit of ordering SharePoint-list-data source values by ID rather than Title.&amp;#160; [To add further insult to injury, the full-blown InfoPath client orders by Title..]&amp;#160; Users wouldn’t go for that on lists that contain upwards of 500 choices, so I had to find a way to order by Title…&lt;/p&gt;  &lt;p&gt;After reading some great articles on using owssvr.dll to get a XML output for a particular list, I figured I had the problem licked.&amp;#160; This method would allow me to return live data (on form-load), required no code-behind, and &lt;em&gt;seemed &lt;/em&gt;straight-forward.&amp;#160; So I followed the instructions (&lt;a title="http://blogs.msdn.com/b/infopath/archive/2007/01/15/populating-form-data-from-sharepoint-list-views.aspx" href="http://blogs.msdn.com/b/infopath/archive/2007/01/15/populating-form-data-from-sharepoint-list-views.aspx"&gt;http://blogs.msdn.com/b/infopath/archive/2007/01/15/populating-form-data-from-sharepoint-list-views.aspx&lt;/a&gt;), and then pressed enter to get a plain-white IE window (no XML as promised).&amp;#160; After verifying that this wasn’t some obscure browser setting, I looked at the lists I was referencing and they were (both) custom lists that also had lookup columns contained within.&amp;#160; I then suspected that the lookup column (especially one that allowed multi-select) wasn’t supported by the owssvr.dll method.&amp;#160; Luckily for me, we are running a nifty little master-list data synchronization on this environment.&amp;#160; The custom code basically reads a list (considered the ‘master’) on Web Application A, Site Collection A, and then writes any add/update/delete actions to copy-lists stored other Site Collections under Web Application B.&amp;#160; Anyways, the ‘synchronized’ lists don’t contain the lookup columns, just the ‘ID’ and ‘Title’ values.&amp;#160; Effectively, this allowed me to test owssvr.dll reading a ‘simple’ list…&lt;/p&gt;  &lt;p&gt;After running a quick test, I discovered that owssvr.dll worked famously with the sync-lists!&amp;#160; So, I rebuilt my form data connections, redeployed the form, and then BAM! Yet another error about SharePoint not being able to access data sources [Error ID 6932](and all of my dropdowns of lookup lists were blank).&amp;#160; After some poking around, I surmised that InfoPath form services (even with cross-domain enabled) doesn’t like crossing SharePoint web applications, even though the user account I was using had permissions to both web applications.&lt;/p&gt;  &lt;h2&gt;&lt;strong&gt;&lt;strong&gt;&lt;strike&gt;Fix&lt;/strike&gt;…Workaround&lt;/strong&gt;: &lt;/strong&gt;&lt;/h2&gt;  &lt;p&gt;So, to get the form to play nice, I simply deployed my form and associated data sources in a site under Web Application B.&amp;#160; By doing this, my owssvr.dll XML files could reference the appropriate sync-lists correctly and in the same web application.&amp;#160; After I did this, the form worked as advertised and I simply changed all of the applicable links to point to the new form location.&lt;/p&gt;  &lt;p&gt;I realize that this is a fairly unique scenario, but I think there are a couple of important takeaways.&amp;#160; First of all, for users that are running into the blank-white IE screen when using owssvr.dll, hopefully this post helps you in your test cases by trying the method after removing lookup columns.&amp;#160; And Second, for those who might be considering/trying to get InfoPath Browser Forms to cross web applications, realize that you may have to somehow provide a simplified version of your list-data.&amp;#160; &lt;/p&gt;  &lt;p&gt;At the end of the day, the form worked as advertised, and the correct columns were returned (and ordered).&amp;#160; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2814" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Office+2010/default.aspx">Office 2010</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Tag/default.aspx">Tag</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Customizing People Search Results in MOSS 2007 – Part 3 of 3 – Search Results Customization</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/06/14/customizing-people-search-results-in-moss-2007-part-3-of-3-search-results-customization.aspx</link><pubDate>Mon, 14 Jun 2010 18:51:28 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2802</guid><dc:creator>Jeremy Williams</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2802</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/06/14/customizing-people-search-results-in-moss-2007-part-3-of-3-search-results-customization.aspx#comments</comments><description>&lt;p&gt;This is the third and final post of a three part series, if you missed it, here’s &lt;a href="http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/05/25/customizing-people-search-results-in-moss-2007-part-1-of-3-user-profile-properties-change.aspx" target="_blank"&gt;Part 1&lt;/a&gt; and &lt;a href="http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/06/09/customizing-people-search-results-in-moss-2007-part-2-of-3-search-configuration.aspx" target="_blank"&gt;Part 2&lt;/a&gt;.&amp;#160; This post will go into the details of consuming the managed properties we configured last time around, and then displaying them in our search results.&lt;/p&gt;  &lt;p&gt;As a review, here’s where we are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/05/25/customizing-people-search-results-in-moss-2007-part-1-of-3-user-profile-properties-change.aspx" target="_blank"&gt;User Profile Properties Changes&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/06/09/customizing-people-search-results-in-moss-2007-part-2-of-3-search-configuration.aspx" target="_blank"&gt;SharePoint Search Changes&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Search Results Page Customization&lt;/strong&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_2.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb.png" width="408" height="398" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Add Managed Properties to List of Columns to Query&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The first step to displaying your newly added managed properties in the search results is make sure they’re being returned as part of your result-set!&amp;#160; To do this, navigate to the people search result page on your Search site.&amp;#160; A quick and easy way to do this is to run a search (using the ‘People’ scope) for your own name.&amp;#160; Once you’re on the search page, go ahead and edit the page.&amp;#160; Once you have the page in edit mode, click on the context menu for ‘People Search Core Results’ and select ‘Modify Shared Web Part’.&amp;#160; On the pane that appears to the right, go ahead and expand the ‘Results Query Options’ Group, then click the text box under the ‘Selected Columns’ heading; and finally, click on the button with the ellipsis (…).&amp;#160; This will pop up a text editor.&amp;#160; To prevent yourself from going a little crazy, I highly recommend editing this text in something else, like Notepad/Wordpad/your favorite IDE/etc.&amp;#160; You will want to add a line (below) for each of your newly added custom managed properties.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;Column Name=&amp;quot;YourManagedPropertyNameHere”/&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In the screenshot below, you can see that I’m adding my ‘StreetAddress’ managed property: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_6.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_2.png" width="304" height="232" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Once you’ve added all of your properties, go ahead and paste your XML&amp;#160; back into SharePoint pop-up text box and click ‘Ok’ on the web part property pane to save your changes.&amp;#160; Now, your custom property is available to and for our final step…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Reference columns in custom XSLT&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now that the people search core results web part is properly returning your managed columns, you’ll want to customize it’s XSLT (style sheet) to include the newly added column(s).&amp;#160; Same as last time, I highly recommend you edit this XSLT in your favorite IDE, as it’s really painful to work with code in SharePoint’s popup text-editor.&amp;#160; Anyways, to access the XSLT, go ahead and click ‘Modify Shared Web Part’ on the People Search Core results web part, and click the ‘XSL Editor…’ button.&amp;#160; &lt;/p&gt;  &lt;p&gt;The XSLT sheet that ships with SharePoint is about 360 lines long, and there’s a couple of places you’ll need to add your column(s).&amp;#160; For the example, I’m simply going to stick in the ‘StreetAddress’ field after a user’s title, department, phone, and office.&amp;#160; Certainly, you can do much cooler things here with the XSLT, but I’ll save that for another day.&amp;#160; The first place you’ll need to add your column is around line 137.&amp;#160; In my example below, I have established my XSLT variable for StreetAddress as ‘street’ (mainly to illustrate the naming differences).&lt;/p&gt;  &lt;p&gt;Important Note: in the ‘select’ value, be sure to use ONLY lowercase text; if you do capitalize names here, you run a very high risk of the proper field not being returned.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_22.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_10.png" width="354" height="103" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The next place to add the property is around line 337, as shown below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_10.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_4.png" width="304" height="100" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And finally, I’ve added an XSL if-block with street around line 355:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_12.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_5.png" width="304" height="278" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Doing this will yield the following results:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_4.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_1.png" width="408" height="135" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;After:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_18.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_8.png" width="408" height="135" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Clearly, the trickiest part of this process is the XSLT customization, which is why I’ve chosen to show you how to simply add a property to the XSLT.&amp;#160; You can do all kinds of cool things with XSLT, such as return the users in a grid pattern with key information beneath their picture, or return people with a contact-card styling, the list is as long as your imagination.&amp;#160; &lt;/p&gt;  &lt;p&gt;Thanks for sticking through all three posts with me; I hope this helps clear up any confusion on the whole process.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Errata&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Random Error&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Sometimes, SharePoint will throw a false error at you after clicking ‘Ok’ to web part changes.&amp;#160; The error looks something like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_14.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_6.png" width="454" height="62" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you do come across this, simply check in your page and then click in the URL bar and press enter (don’t just refresh the page).&amp;#160; If you still get the error after that, you’ve most likely made a coding error in your XSLT.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Field Not Displaying&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;If your field isn’t returning, and you’re fairly confident that you’ve written valid XSLT and added/configured/mapped all your properties correctly, you might need to refresh your user profiles.&amp;#160; To do this, initiate a full import on your people profiles in SharePoint.&amp;#160; Once the full import has completed, start an incremental search crawl to pick up these changes.&amp;#160; Once complete, go ahead and run your people search again and your field should now appear:&lt;/p&gt;  &lt;p&gt;Example of Missing Field (notice the hanging ‘-&amp;#39; after ‘Downtown’; this is where Street Address should be:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_16.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_7.png" width="354" height="92" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Example of the Missing Field existing as expected:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_20.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_9.png" width="354" height="99" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2802" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/search/default.aspx">search</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>Customizing People Search Results in MOSS 2007 – Part 2 of 3 – Search Configuration</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/06/09/customizing-people-search-results-in-moss-2007-part-2-of-3-search-configuration.aspx</link><pubDate>Wed, 09 Jun 2010 18:36:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2800</guid><dc:creator>Jeremy Williams</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2800</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/06/09/customizing-people-search-results-in-moss-2007-part-2-of-3-search-configuration.aspx#comments</comments><description>&lt;p&gt;This is the second post of a three part series, if you missed it, here&amp;rsquo;s &lt;a target="_blank" href="http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/05/25/customizing-people-search-results-in-moss-2007-part-1-of-3-user-profile-properties-change.aspx"&gt;Part 1&lt;/a&gt;.&amp;nbsp; This post will go into the details of taking the User Profile Properties we created the last time around, and making sure that they&amp;rsquo;re available to us in Search.&lt;/p&gt;
&lt;p&gt;As a review, here&amp;rsquo;s where we are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/05/25/customizing-people-search-results-in-moss-2007-part-1-of-3-user-profile-properties-change.aspx"&gt;User Profile Properties Changes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SharePoint Search Changes&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.rightpointconsulting.com/community/blogs/viewpoint/archive/2010/06/14/customizing-people-search-results-in-moss-2007-part-3-of-3-search-results-customization.aspx"&gt;Search Results Page Customization &lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_2.png"&gt;&lt;img height="400" width="408" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Run an incremental crawl&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you haven&amp;rsquo;t already, be sure to run a full import on your user profiles (This should be done after you&amp;rsquo;ve added all your custom profile properties from step one)&amp;nbsp; Assuming that a full import has run, the next step is to run a crawl on whatever content source is crawling people.&amp;nbsp; 9 times out of 10, this would be the &amp;lsquo;Local Office SharePoint Server Sites&amp;rsquo; content source.&amp;nbsp; This can be done by going to your Search Administration page, clicking on &amp;lsquo;Content Sources&amp;rsquo; then selecting &amp;lsquo;Start Incremental Crawl&amp;rsquo; from the &amp;lsquo;Local Office SharePoint Server Sites&amp;rsquo; context menu.&lt;/p&gt;
&lt;p&gt;After the crawl has completed, it should have picked up all of your newly defined user profile properties as a crawled property.&amp;nbsp; Next, we&amp;rsquo;ll want to use those newly crawled properties in the creation of our managed properties.&amp;nbsp; The managed property will (ultimately) be used to return information about a user in the search results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Add mapped profile properties as managed properties&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To create a new Managed Property, navigate to your SSP management page.&amp;nbsp; From there, click on Search Administration, and then click on &amp;lsquo;Metadata properties&amp;rsquo;.&amp;nbsp; Once at the &lt;em&gt;Metadata Property Mappings &lt;/em&gt;window, click on the &amp;lsquo;New Managed Property&amp;rsquo; link, which will take you to a screen similar to the one shown below:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_4.png"&gt;&lt;img height="257" width="454" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_1.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This is where you will be defining the name (to be used in search) of all your people profiles.&amp;nbsp; Personally, I like to use the same name as that returned by the crawled property.&amp;nbsp; This is due to the fact that I handled the naming of the property when I created it.&amp;nbsp; It simply makes life easier to remember only one property name that to track the property through all phases (AD, Profile Property, Crawled Property, Managed Property, XSLT variable).&amp;nbsp; In the screenshot above, I have created a managed property for Street Address.&amp;nbsp; Assuming you&amp;rsquo;re following my advice above, you will use the same profile property name for naming the managed property.&amp;nbsp; In my example, this yields a Property name of: &amp;ldquo;StreetAddress&amp;rdquo;.&amp;nbsp; Filling in a description is strictly optional, I have elected not to do so in my example.&amp;nbsp; Be sure to leave the &amp;lsquo;Text&amp;rsquo; radio button checked, as this will act as a filter on crawled property search we&amp;rsquo;re about to run.&amp;nbsp; [Obviously, if you&amp;rsquo;re adding a crawled property that is an integer value, be sure to change this radio to reflect as such] Next, you will need to click &amp;lsquo;Add Mapping&amp;rsquo; to select the crawled property(-ies) referenced by this managed property.&amp;nbsp; In my example, I know that I named by Profile Property &amp;lsquo;StreetAddress&amp;rsquo;, so I&amp;rsquo;ll search for &amp;lsquo;Street&amp;rsquo; in the dialog:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_6.png"&gt;&lt;img height="339" width="304" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_2.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;This is an easy one, as only 1 result was returned.&amp;nbsp; Generally speaking, if you get more than 1 result, be sure to select the result prefixed with &amp;lsquo;People&amp;rsquo;.&amp;nbsp; Click Ok and you&amp;rsquo;ll return to the &amp;lsquo;New Managed Property&amp;rsquo; Screen.&amp;nbsp; The remaining options shouldn&amp;rsquo;t impact us, so you can leave them alone.&amp;nbsp; Go ahead and click Ok.&amp;nbsp; Voila, you&amp;rsquo;ve created a Managed Property for StreetAddress, bringing you one step closer to your customized People Search experience.&amp;nbsp; Repeat as necessary for all of the properties you&amp;rsquo;ve added to User Profiles.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Run an incremental crawl&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re finished adding all of your new Managed Properties, you&amp;rsquo;ll need to run an incremental crawl.&amp;nbsp; Disclaimer: Most (if not all) Microsoft documentation claims that you have to run a full crawl at this point.&amp;nbsp; I&amp;rsquo;ve only had to do that once for &lt;em&gt;people profiles&lt;/em&gt; and their associated metadata properties; typically, the incremental crawl works for me.&amp;nbsp; The purpose of this crawl is to &amp;lsquo;pick up&amp;rsquo; all of your newly update managed properties.&amp;nbsp; Once you start this crawl, go ahead and get yourself a cup of coffee and marvel at your SharePoint prowess!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That wraps it up for the second step of the process.&amp;nbsp; I hope to have the third and final post up soon, so stay tuned!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2800" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/search/default.aspx">search</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>Customizing People Search Results in MOSS 2007 – Part 1 of 3 – User Profile Properties Change</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/05/25/customizing-people-search-results-in-moss-2007-part-1-of-3-user-profile-properties-change.aspx</link><pubDate>Tue, 25 May 2010 15:03:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2798</guid><dc:creator>Jeremy Williams</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2798</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/05/25/customizing-people-search-results-in-moss-2007-part-1-of-3-user-profile-properties-change.aspx#comments</comments><description>&lt;p&gt;One of the niceties (at least for us implementer-folk) of SharePoint&amp;rsquo;s search is that both the content and display of the result page can be changed with a few tweaks to some the profile sync process, managed properties, search query result web part properties, and the result XSLT.&amp;nbsp; Okay, so I&amp;rsquo;ll admit, it isn&amp;rsquo;t the most straightforward process, but it&amp;rsquo;s still pretty cool that this can all be accomplished without any custom code!&amp;nbsp; If you have liberal definitions of &amp;ldquo;out of the box SharePoint functionality&amp;rdquo; like I do, then you&amp;rsquo;re in luck.&amp;nbsp; Everything we&amp;rsquo;ll be going through here can be considered Out of Box!&lt;/p&gt;
&lt;p&gt;Alright, so this post-series will be fairly detailed, therefore it will be broken up (for both author and reader sanity) into three parts:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;User Profile Properties Changes&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.rightpointconsulting.com/community/blogs/viewpoint/archive/2010/06/09/customizing-people-search-results-in-moss-2007-part-2-of-3-search-configuration.aspx"&gt;SharePoint Search Changes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.rightpointconsulting.com/community/blogs/viewpoint/archive/2010/06/14/customizing-people-search-results-in-moss-2007-part-3-of-3-search-results-customization.aspx"&gt;Search Results Page Customization&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For those of you that have done any searching on the subject, you will find a decent amount of custom people search XSLT result sets out there.&amp;nbsp; However, what you&amp;rsquo;ll struggle to find is an end-to-end instruction set to fully implement a customized people search experience.&amp;nbsp; I know it&amp;rsquo;s a lofty goal, but I hope this series of posts can help you get from zero to your custom people search experience.&amp;nbsp; At the very least, it should get you pretty close!&amp;nbsp; &lt;/p&gt;
&lt;p&gt;So here&amp;rsquo;s the process that we&amp;rsquo;ll be going through:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_6.png"&gt;&lt;img height="394" width="404" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_2.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are only going to use the 21 or so default mapped properties, feel free to skip ahead to the second post.&amp;nbsp; Again, this first part is &lt;strong&gt;only&lt;/strong&gt; required if you have non-standard user properties that you would like to display in People Results.&amp;nbsp; My favorite example of a non-standard attribute is the &amp;lsquo;Mobile Phone&amp;rsquo; value.&amp;nbsp; In most AD implementations, a standard user account will not be able to &amp;lsquo;read&amp;rsquo; this attribute into SharePoint&amp;rsquo;s user profiles.&amp;nbsp; In order to properly access these properties, work with your AD administrator to secure a Profile Import Account with the correct level of access.&amp;nbsp; Basically, the account will need the ability to read each of the fields that you&amp;rsquo;re working to import.&amp;nbsp; I&amp;rsquo;m not going to dive into the details of setting up the correct permissions in this series, perhaps in the future I&amp;rsquo;ll tackle that subject.&amp;nbsp; In the meantime, if (and only if) you&amp;rsquo;re in a test environment, the easy solution is to use a Domain Administrator account; please &lt;strong&gt;do not&lt;/strong&gt; do this in your production environment.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;To change this account, navigate to the Shared Services Provider (SSP) that you&amp;rsquo;ll be working on (you may have a direct link and/or it&amp;rsquo;s accessible from Central Administration).&amp;nbsp; Once on the SSP homepage, click the &amp;lsquo;User Profiles and Properties&amp;rsquo; link.&amp;nbsp; From the next page, you will want to click on the &amp;lsquo;Configure Profile Import&amp;rsquo; link.&amp;nbsp; From the following page, select the &amp;lsquo;Specify Account&amp;rsquo; radio button in the &amp;lsquo;Default Access Account&amp;rsquo; heading and enter in the credentials for your elevated account.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The next step in the process is to add whatever additional fields you need to the &amp;lsquo;User Profiles and&amp;nbsp; Properties&amp;rsquo; area.&amp;nbsp; To do this, navigate to SSP homepage, and click on the &amp;lsquo;User Profile Properties&amp;rsquo; link.&amp;nbsp; Near the bottom of this window, you will see a heading called &amp;lsquo;User Profile Properties&amp;rsquo;; click on the &amp;lsquo;Add profile property&amp;rsquo; link.&amp;nbsp; This will bring you to the form shown below.&amp;nbsp; If you&amp;rsquo;re looking to display the &amp;lsquo;mobile&amp;rsquo; attribute (or whatever value you&amp;rsquo;re adding here) to all employees, feel free to mirror the settings in the screenshot below.&amp;nbsp; If not, tweak the settings to your liking. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_8.png"&gt;&lt;img height="960" width="454" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_3.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The hardest part of this form is the dropdown near the end where you actually select what Active Directory field you will be mapping to.&amp;nbsp; These field names are not necessarily intuitively named.&amp;nbsp; For example, city is called &amp;lsquo;l&amp;rsquo;.&amp;nbsp; To get an idea of what field you&amp;rsquo;re looking for, go ahead and and fire up ADSI Edit and connect to your favorite domain controller.&amp;nbsp; From here, you&amp;rsquo;ll want to navigate to an OU that contains a User Account with the property that you&amp;rsquo;re looking for.&amp;nbsp; Once you find the user account, go ahead and right click on it, and select properties.&amp;nbsp; This will bring you an exhaustive list of that object&amp;rsquo;s AD attributes.&amp;nbsp; Go ahead and find the property you&amp;rsquo;re looking for and then select that property in SharePoint&amp;rsquo;s Add User Profile Form.&amp;nbsp; Be sure to note the AD-names of all properties that you add as you&amp;rsquo;ll need this list later.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After clicking OK and repeating this process for all of the non-standard fields you want to import you should be ready to move on to the next post, which I&amp;rsquo;ll finish up in the next couple of days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2798" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/search/default.aspx">search</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>Building a Better SPGridView</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/03/30/building-a-better-spgridview.aspx</link><pubDate>Tue, 30 Mar 2010 18:15:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2782</guid><dc:creator>Jonathan Rupp</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2782</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/03/30/building-a-better-spgridview.aspx#comments</comments><description>&lt;p&gt;Sometimes with SharePoint customizations, you run into a scenario where you want to do something that is &amp;ldquo;just like this OOTB thing, but a little bit different.&amp;rdquo; Sometimes, that turns out to be trivial. Sometimes it turns out to be a fair amount of work to get what you want. &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spgridview.aspx"&gt;SPGridView&lt;/a&gt; is one the latter &amp;ndash; sounds great, but takes more work than I&amp;rsquo;d like to be at feature-parity with the less generic components.&lt;/p&gt;
&lt;p&gt;Recently, I had two different projects that wanted something that looked like a ListViewWebpart, but had a more complex data source than a simple view on a list (both involved fetching data from multiple sites within the site collection and joining it to a couple of other lists). Seems simple enough, right? Fetch the data needed from all the source lists (and/or cross-site queries via &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsitedataquery.aspx"&gt;SPSiteDataQuery&lt;/a&gt;) into custom objects, join them together via &lt;a href="http://msdn.microsoft.com/en-us/library/bb397919.aspx"&gt;LINQ-to-Objects&lt;/a&gt;, stick the results in a DataTable, display it with SPGridView, and off to the next task, right? Well, yes. It does look right, but sorting and filtering don&amp;rsquo;t work. Even when you add ObjectDataSource to the mix, there are issues with sorting and filtering getting in each other&amp;rsquo;s way.&lt;/p&gt;
&lt;p&gt;After a bit more digging online, I found a few sources that pointed me in the right direction of what I&amp;rsquo;d need to do to make it all work:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.reversealchemy.net/2009/05/01/building-a-spgridview-control-part-1-introducing-the-spgridview/"&gt;http://www.reversealchemy.net/2009/05/01/building-a-spgridview-control-part-1-introducing-the-spgridview/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.reversealchemy.net/2009/05/24/building-a-spgridview-control-part-2-filtering/%20"&gt;http://www.reversealchemy.net/2009/05/24/building-a-spgridview-control-part-2-filtering/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://vspug.com/bobsbonanza/2007/07/02/filtering-with-spgridview/%20"&gt;http://vspug.com/bobsbonanza/2007/07/02/filtering-with-spgridview/&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these, plus a bit of tinkering, I got it to work like my first client wanted. However, I had to do a lot more work than I wanted to make it happen &amp;ndash; until the last piece was in place, it wouldn&amp;rsquo;t work quite right. Two weeks later, I had another client ask me for almost the same thing (obviously, the data involved was quite a bit different, but the basic idea was the same &amp;ndash; custom data fed into a table that looks like a normal SharePoint one). Since I&amp;rsquo;m a heavy opponent of &amp;ldquo;reuse by copy and paste&amp;rdquo;, I thought I&amp;rsquo;d separate out the &amp;ldquo;fixes&amp;rdquo; to the SPGridView from the particulars of this implementation and build a control I could use in the future when this kind of scenario came up.&lt;/p&gt;
&lt;p&gt;In my mind, the developer wanting to use this control should only have to provide the information relevant to the problem domain (data, columns) and leave the implementation details (wiring sorting/filtering to work and work together) up to the control. To that end, I present SmartSPGridView:&lt;/p&gt;
&lt;pre style="overflow:auto;"&gt;&lt;div style="font-family:Courier New;font-size:10pt;color:black;background:white;"&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebControls;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Data;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;using&lt;/span&gt; System.Web.UI;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;8&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;namespace&lt;/span&gt; SPGridDemo&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;/span&gt;&amp;nbsp;{&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;11&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; &lt;/span&gt;&lt;span style="color:gray;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;12&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; Wraps up everything needed for automatic sorting and filtering.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;13&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; Heavily based on:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;14&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt;&amp;nbsp;&amp;nbsp; http://www.reversealchemy.net/2009/05/01/building-a-spgridview-control-part-1-introducing-the-spgridview/&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;15&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt;&amp;nbsp;&amp;nbsp; http://www.reversealchemy.net/2009/05/24/building-a-spgridview-control-part-2-filtering/&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;16&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; Triggering binding is left up to the parent control -- call GridView.DataBind() -- GetData event will be raised for you to supply the data.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;17&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; Also http://vspug.com/bobsbonanza/2007/07/02/filtering-with-spgridview/&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;18&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; &lt;/span&gt;&lt;span style="color:gray;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;19&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SmartSPGridView&lt;/span&gt; : WebControl, INamingContainer&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;20&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre style="overflow:auto;"&gt;&lt;div style="font-family:Courier New;font-size:10pt;color:black;background:white;"&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;21&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;public&lt;/span&gt; SmartSPGridView()&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;22&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;23&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// initialize the ObjectDataSource and SPGridView, wire them together and hook in the needed event handlers&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;24&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataSource = &lt;span style="color:blue;"&gt;new&lt;/span&gt; ObjectDataSource()&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;25&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;26&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SelectMethod = &lt;span style="color:#a31515;"&gt;&amp;quot;SelectData&amp;quot;&lt;/span&gt;,&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;27&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; TypeName = &lt;span style="color:blue;"&gt;this&lt;/span&gt;.GetType().AssemblyQualifiedName,&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;28&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&lt;span style="color:#a31515;"&gt;&amp;quot;DS&amp;quot;&lt;/span&gt;,&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;29&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;30&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; GridView = &lt;span style="color:blue;"&gt;new&lt;/span&gt; SPGridView()&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;31&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;32&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AllowSorting = &lt;span style="color:blue;"&gt;true&lt;/span&gt;,&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;33&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AllowFiltering = &lt;span style="color:blue;"&gt;true&lt;/span&gt;,&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;34&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AutoGenerateColumns = &lt;span style="color:blue;"&gt;false&lt;/span&gt;,&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;35&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FilteredDataSourcePropertyName = &lt;span style="color:#a31515;"&gt;&amp;quot;FilterExpression&amp;quot;&lt;/span&gt;,&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;36&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FilteredDataSourcePropertyFormat = &lt;span style="color:#a31515;"&gt;&amp;quot;{1} = &amp;#39;{0}&amp;#39;&amp;quot;&lt;/span&gt;,&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;37&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&lt;span style="color:#a31515;"&gt;&amp;quot;view&amp;quot;&lt;/span&gt;,&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;38&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;39&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; GridView.DataSourceID = DataSource.ID;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;40&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataSource.ObjectCreating += &lt;span style="color:blue;"&gt;new&lt;/span&gt; ObjectDataSourceObjectEventHandler(DataSource_ObjectCreating);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;41&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataSource.Filtering += &lt;span style="color:blue;"&gt;new&lt;/span&gt; ObjectDataSourceFilteringEventHandler(DataSource_Filtering);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;42&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; GridView.Sorting += &lt;span style="color:blue;"&gt;new&lt;/span&gt; GridViewSortEventHandler(GridView_Sorting);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;43&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; GridView.RowDataBound += &lt;span style="color:blue;"&gt;new&lt;/span&gt; GridViewRowEventHandler(GridView_RowDataBound);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;44&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;45&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;46&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;public&lt;/span&gt; SPGridView GridView { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;47&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;public&lt;/span&gt; ObjectDataSource DataSource { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;48&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre style="overflow:auto;"&gt;&lt;div style="font-family:Courier New;font-size:10pt;color:black;background:white;"&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;49&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; &lt;/span&gt;&lt;span style="color:gray;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;50&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; Add filter header pieces&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;51&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; &lt;/span&gt;&lt;span style="color:gray;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;52&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;void&lt;/span&gt; GridView_RowDataBound(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, GridViewRowEventArgs e)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;53&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;54&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (sender == &lt;span style="color:blue;"&gt;null&lt;/span&gt; || e.Row.RowType != DataControlRowType.Header)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;55&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;56&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;57&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;58&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;59&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SPGridView grid = sender &lt;span style="color:blue;"&gt;as&lt;/span&gt; SPGridView;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;60&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;61&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;String&lt;/span&gt;.IsNullOrEmpty(grid.FilterFieldName))&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;62&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;63&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;64&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;65&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;66&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Show icon on filtered column&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;67&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;for&lt;/span&gt; (&lt;span style="color:blue;"&gt;int&lt;/span&gt; i = 0; i &amp;lt; grid.Columns.Count; i++)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;68&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;69&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataControlField field = grid.Columns[i];&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;70&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;71&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (field.SortExpression == grid.FilterFieldName)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;72&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;73&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Image filterIcon = &lt;span style="color:blue;"&gt;new&lt;/span&gt; Image();&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;74&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; filterIcon.ImageUrl = &lt;span style="color:#a31515;"&gt;&amp;quot;/_layouts/images/filter.gif&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;75&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; filterIcon.Style[HtmlTextWriterStyle.MarginLeft] = &lt;span style="color:#a31515;"&gt;&amp;quot;2px&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;76&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;77&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// If we simply add the image to the header cell it will&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;78&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// be placed in front of the title, which is not how it&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;79&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// looks in standard SharePoint. We fix this by the code&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;80&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// below.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;81&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Literal headerText = &lt;span style="color:blue;"&gt;new&lt;/span&gt; Literal();&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;82&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; headerText.Text = field.HeaderText;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;83&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;84&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PlaceHolder panel = &lt;span style="color:blue;"&gt;new&lt;/span&gt; PlaceHolder();&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;85&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; panel.Controls.Add(headerText);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;86&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; panel.Controls.Add(filterIcon);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;87&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;88&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.Row.Cells[i].Controls[0].Controls.Add(panel);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;89&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;90&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;91&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;92&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;93&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;94&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre style="overflow:auto;"&gt;&lt;div style="font-family:Courier New;font-size:10pt;color:black;background:white;"&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;95&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;void&lt;/span&gt; GridView_Sorting(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, GridViewSortEventArgs e)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;96&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;97&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// sorting loses the FilterExpression, so we have to restore it&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;98&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (ViewState[&lt;span style="color:#a31515;"&gt;&amp;quot;FilterExpression&amp;quot;&lt;/span&gt;] != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;99&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;100&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataSource.FilterExpression = (&lt;span style="color:blue;"&gt;string&lt;/span&gt;)ViewState[&lt;span style="color:#a31515;"&gt;&amp;quot;FilterExpression&amp;quot;&lt;/span&gt;];&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;101&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;102&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;103&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;104&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;void&lt;/span&gt; DataSource_Filtering(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, ObjectDataSourceFilteringEventArgs e)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;105&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;106&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// save the filter expression built when we add a filter, so we can restore it when sort blows it away&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;107&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ViewState[&lt;span style="color:#a31515;"&gt;&amp;quot;FilterExpression&amp;quot;&lt;/span&gt;] = ((ObjectDataSourceView)sender).FilterExpression;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;108&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;109&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;110&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;protected&lt;/span&gt; &lt;span style="color:blue;"&gt;override&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; LoadViewState(&lt;span style="color:blue;"&gt;object&lt;/span&gt; savedState)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;111&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;112&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;base&lt;/span&gt;.LoadViewState(savedState);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;113&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;114&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// clear the saved filter so we don&amp;#39;t restore it if the user sorts&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;115&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (Context.Request.Form[&lt;span style="color:#a31515;"&gt;&amp;quot;__EVENTARGUMENT&amp;quot;&lt;/span&gt;] != &lt;span style="color:blue;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;116&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Context.Request.Form[&lt;span style="color:#a31515;"&gt;&amp;quot;__EVENTARGUMENT&amp;quot;&lt;/span&gt;].EndsWith(&lt;span style="color:#a31515;"&gt;&amp;quot;__ClearFilter__&amp;quot;&lt;/span&gt;))&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;117&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;118&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// Clear FilterExpression&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;119&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ViewState.Remove(&lt;span style="color:#a31515;"&gt;&amp;quot;FilterExpression&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;120&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;121&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;122&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre style="overflow:auto;"&gt;&lt;div style="font-family:Courier New;font-size:10pt;color:black;background:white;"&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;123&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;void&lt;/span&gt; DataSource_ObjectCreating(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, ObjectDataSourceEventArgs e)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;124&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;125&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// called by the ObjectDataSource to create an instance of this object&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;126&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.ObjectInstance = &lt;span style="color:blue;"&gt;this&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;127&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;128&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;129&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;protected&lt;/span&gt; &lt;span style="color:blue;"&gt;override&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; CreateChildControls()&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;130&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;131&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:green;"&gt;// add the ObjectDataSource and SPGridView as children&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;132&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;base&lt;/span&gt;.CreateChildControls();&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;133&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Controls.Add(DataSource);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;134&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;this&lt;/span&gt;.Controls.Add(GridView);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;135&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;136&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;137&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;protected&lt;/span&gt; &lt;span style="color:blue;"&gt;override&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; OnLoad(&lt;span style="color:#2b91af;"&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;138&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;139&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;base&lt;/span&gt;.OnLoad(e);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;140&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;this&lt;/span&gt;.EnsureChildControls();&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;141&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;142&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;143&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;public&lt;/span&gt; DataTable SelectData()&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;144&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;145&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;var&lt;/span&gt; e = &lt;span style="color:blue;"&gt;new&lt;/span&gt; GetDataEventArgs();&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;146&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; OnGetData(e);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;147&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;return&lt;/span&gt; e.DataTable;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;148&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;149&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre style="overflow:auto;"&gt;&lt;div style="font-family:Courier New;font-size:10pt;color:black;background:white;"&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;150&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #region&lt;/span&gt; GetData event+args&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;151&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;GetDataEventArgs&lt;/span&gt; : &lt;span style="color:#2b91af;"&gt;EventArgs&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;152&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;153&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;public&lt;/span&gt; DataTable DataTable { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;154&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;155&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;event&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;EventHandler&lt;/span&gt;&amp;lt;GetDataEventArgs&amp;gt; GetData;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;156&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;protected&lt;/span&gt; &lt;span style="color:blue;"&gt;virtual&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; OnGetData(GetDataEventArgs e)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;157&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;158&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;EventHandler&lt;/span&gt;&amp;lt;GetDataEventArgs&amp;gt; eh = GetData;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;159&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;if&lt;/span&gt; (&lt;span style="color:blue;"&gt;null&lt;/span&gt; != eh)&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;160&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;161&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; eh(&lt;span style="color:blue;"&gt;this&lt;/span&gt;, e);&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;162&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;163&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;164&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;165&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;166&lt;/span&gt;&amp;nbsp;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Basically, it&amp;rsquo;s a UserControl with an ObjectDataSource and SPGridView wired together and with the events needed to get full sorting/filtering working already in place. To use this, all you have to do in your webpart is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create an instance of SmartSPGridView &lt;/li&gt;
&lt;li&gt;Hook the GetData event and supply the DataTable &lt;/li&gt;
&lt;li&gt;Call DataBind() at the appropriate time (OnPreRender works well) &lt;/li&gt;
&lt;li&gt;Configure and add the view to your webpart (usually in CreateChildControls) 
    
&lt;ul&gt;
&lt;li&gt;Add the columns &lt;/li&gt;
&lt;li&gt;Populate the FilterDataFields property &lt;/li&gt;
&lt;li&gt;Add the view to the webpart&amp;rsquo;s Controls collection &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;ObjectDataSource makes sorting work, FilterDataFields makes filtering work, and several event handlers keep them from tripping over each other. And, I don&amp;rsquo;t have to keep fighting the same battle every time I need this kind of solution for a project. Now, I&amp;rsquo;m off to pick another fight with Sharepoint.&lt;/p&gt;
&lt;p&gt;The downloadable version of the code is linked below.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2782" width="1" height="1"&gt;</description><enclosure url="http://www.rightpoint.com/community/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.00.27.82/SmartSPGridView.zip" length="1982" type="application/zip" /><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SPGridView/default.aspx">SPGridView</category></item><item><title>Datasheet View Extras – Who Knew?</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/03/15/datasheet-view-extras-who-knew.aspx</link><pubDate>Mon, 15 Mar 2010 16:40:18 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2775</guid><dc:creator>Jeremy Williams</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2775</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/03/15/datasheet-view-extras-who-knew.aspx#comments</comments><description>&lt;p&gt;I often tell my clients that I learn something new about SharePoint everyday, and (today) I have the perfect anecdote to prove it!&amp;#160; For those that have already found the sweet toolbar on the datasheet view, the rest of this post may be a bit boring to you; however, if you haven’t found the datasheet view task-pane, read on!&lt;/p&gt;  &lt;p&gt;Recently, I was working on some list items in datasheet view on SharePoint 2007, and I accidentally clicked on the little right arrow on the right side of the datasheet view:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_2.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb.png" width="479" height="208" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Much to my surprise, this handy-dandy little task-pane came zooming out:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_4.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb_5F00_1.png" width="481" height="209" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;While the task-pane doesn’t offer any earth-shattering features, it’s still a handy little tool.&amp;#160; The undo feature is nice to have around, as was the sort option (much easier/quicker than clicking all of the header in an attempt to get the perfect sort).&amp;#160; Also, the ‘Clear Filters’ button was handy as well, and stopped my previous habit of refreshing the browser to get back to a clean-slate on the data sheet viewer.&amp;#160; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2775" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Usability/default.aspx">Usability</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/tool/default.aspx">tool</category></item><item><title>SharePoint 2007 Search Administration: Scheduling and the UI</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/02/19/sharepoint-2007-search-administration-scheduling-and-the-ui.aspx</link><pubDate>Fri, 19 Feb 2010 18:40:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2771</guid><dc:creator>Jeremy Williams</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2771</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/02/19/sharepoint-2007-search-administration-scheduling-and-the-ui.aspx#comments</comments><description>&lt;p&gt;As an SSP administrator, one can control and tweak the many aspects of SharePoint Search.&amp;nbsp; One piece of the puzzle an admin can configure is a content source.&amp;nbsp; For the uninitiated, a content source is simply a location where SharePoint Search is going to go out and look for files.&amp;nbsp; Some examples of content sources could be all of your SharePoint sites, a file share, or even your public website.&amp;nbsp; When configuring a content source, an administrator must choose how often that source will be crawled.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;There are two types of crawls, a full crawl and an incremental crawl.&amp;nbsp; While there is an (almost) infinite number of schedules one could set up for their content source, I often see a full crawl happening relatively infrequently (once a week or month, depending on content size), and incremental crawls happening quite frequently (every 5-60 minutes).&amp;nbsp; Why?&amp;nbsp; Let&amp;rsquo;s say a user uploads a file to SharePoint and tells their buddy, &amp;ldquo;Hey, I just uploaded the document about Client ABC to SharePoint, go check it out!&amp;rdquo;&amp;nbsp; Their buddy (since he doesn&amp;rsquo;t know where the file is located) goes right to his trusty SharePoint search box and searches for &amp;ldquo;Client ABC&amp;rdquo;.&amp;nbsp; If an incremental crawl hasn&amp;rsquo;t run since the file was uploaded, then it won&amp;rsquo;t appear in the results.&amp;nbsp; This in turn makes for frustrated users, and an all around &amp;lsquo;bad&amp;rsquo; SharePoint experience [but alas, I digress..]&lt;/p&gt;
&lt;p&gt;Back to the point, when scheduling an incremental crawl, here&amp;rsquo;s a fairly typical starting point (picture below):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_2.png"&gt;&lt;img height="285" width="506" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/image_5F00_thumb.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Everything seems to make sense in there, except for the last two text boxes.&amp;nbsp;&amp;nbsp; One way to interpret that section is, &amp;ldquo;Repeat the incremental crawl every 15 minutes and allow it to run for 1440 minutes&amp;rdquo;.&amp;nbsp; Based on this interpretation, one may be lead to believe that an incremental crawl could start and run as long as 1440 minutes (that&amp;rsquo;s 1 full day).&amp;nbsp; Well, as an SSP admin, I would hate for there to (potentially) be 1 crawl each day, so I&amp;rsquo;m going to change that 1440 to 20.&amp;nbsp; Great, I&amp;rsquo;ve got crawl set up and my users should always be able to find their files (relatively) quickly, right? &lt;/p&gt;
&lt;p&gt;Sadly, the answer is No.&amp;nbsp; That text is actually interpreted as, &amp;ldquo;Repeat the incremental crawl every 15 minutes, and continue crawling every 15 minutes for 1440 minutes.&amp;rdquo;&amp;nbsp; So, in my example above, the text becomes, &amp;ldquo;Repeat the incremental crawl every 15 minutes continue crawling every 15 minutes for 20 minutes.&amp;rdquo;&amp;nbsp; This will yield you exactly 2 incremental crawls everyday, one around midnight, and the other around 12:15&amp;hellip;After that, you&amp;rsquo;ll have to wait until midnight rolls around again.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;For some users, this might have been a &amp;ldquo;duh&amp;rdquo; type of post because they interpreted the text and control in the manner Microsoft intended.&amp;nbsp; However, other users may have incorrectly interpreted the text/controls as my example pointed out&amp;hellip;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2771" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/How+it+Works/default.aspx">How it Works</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category></item><item><title>MySites and Quotas: The Nuances</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/02/16/mysites-and-quotas-the-nuances.aspx</link><pubDate>Tue, 16 Feb 2010 18:15:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2770</guid><dc:creator>Jeremy Williams</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2770</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/02/16/mysites-and-quotas-the-nuances.aspx#comments</comments><description>&lt;p&gt;Site Quotas in SharePoint 2007 are a great tool, but they can sometimes be misunderstood.&amp;nbsp; One of the most common confusions with quotas comes with their interaction with MySites.&amp;nbsp; MySites (IMHO) are a great feature of SharePoint 2007, and are only getting better in SharePoint 2010.&amp;nbsp; However, the adoption of MySites in many organizations is organic and unplanned.&amp;nbsp; Right around the time that MySites near critical mass, the desire to wrap some additional governance around the sites crops up.&amp;nbsp; Arguably, one of the most obvious governance tools for MySites is a Site Quota.&amp;nbsp; So the governance committee decides on some thresholds and passes the implementation down to their Farm Administrators&amp;hellip;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s put on our &amp;lsquo;Farm Administrator&amp;rsquo; hat&amp;hellip;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I need to enforce a Personal Site quota on my users, so I&amp;rsquo;ll just set up the thresholds on the Personal Site quota template, and apply that to MySites.&amp;nbsp; After that, everyone now has that quota, right? &lt;b&gt;Wrong!&amp;nbsp; &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Okay, so that didn&amp;rsquo;t work and now I&amp;rsquo;m getting yelled at because users are uploading their personal photo and music collections to their MySites, thereby eating up all the space on our SAN.&amp;nbsp; Since editing the quota template didn&amp;rsquo;t do the trick, let&amp;rsquo;s go ahead and create a new template and apply that to MySites.&amp;nbsp; Alright, now everyone has that quota right? &lt;b&gt;Wrong Again!&amp;nbsp; &lt;/b&gt;[Aside: Remember, you can always block certain file extensions from ever being uploaded to SharePoint in Central Administration.]&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;Darn it SharePoint, you&amp;rsquo;re really raining on my parade, what am I doing wrong?!?!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Like many really annoying problems, this boils down to semantics&amp;hellip;Quotas are called &amp;lsquo;Quota Templates&amp;rsquo; for a reason, they are a template, and act just like a&amp;nbsp; site template would.&amp;nbsp; After applying a template, if I make a change to the template, all new sites using the template will take the new values; but the old sites will remain static.&amp;nbsp; Here&amp;rsquo;s a laundry list of nuances, and a quick demo/proof of this behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To reliably change the quotas of MySites, don&amp;rsquo;t create a new template, you&amp;rsquo;ll just want to edit the Personal Site Template.&amp;nbsp; I&amp;rsquo;m not saying that you can&amp;rsquo;t create your own templates, but why work harder if you can work smarter? &lt;/li&gt;
&lt;li&gt;Quotas act like site templates; they&amp;rsquo;re a snapshot&amp;hellip;So if I make site A when personal site quota = 10/8; then I change the quota to 50/40 and create site B, site B quota = 50/40, site A quota = 10/8 &lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t always rely on Central Admin to tell you the truth about site quotas and what a particular collection&amp;rsquo;s quota is; instead use the stsadm &amp;ndash;o enumsites command.&amp;nbsp; Screen-cap below: &lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/clip_5F00_image002_5F00_2.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="clip_image002" alt="clip_image002" src="http://www.rightpointconsulting.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/viewpoint/clip_5F00_image002_5F00_thumb.jpg" border="0" width="511" height="158" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;
&lt;ul&gt;
&lt;li&gt;Administrator was a manually set quota &lt;/li&gt;
&lt;li&gt;Test1 was using the initial Personal Site Template Quota &lt;/li&gt;
&lt;li&gt;Then I changed the Personal Site Template Quota, did an iisreset for good measure, and made test2&amp;rsquo;s MySite. &lt;/li&gt;
&lt;li&gt;So Test 1 and Test 2 used the same template, however they have different values since the template was different during each site&amp;rsquo;s respective build-time. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At the end of the day, the best approach is to properly plan for MySites and enact a reasonable quota template right from the beginning.&amp;nbsp; If that isn&amp;rsquo;t an option, you can customize (or search for other&amp;rsquo;s customizations/extension) stsadm.exe to iterate through MySites and manually apply your new template.&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2770" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Social+Networking/default.aspx">Social Networking</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Social+Computing/default.aspx">Social Computing</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/How+it+Works/default.aspx">How it Works</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category></item><item><title>Living in the Social Media Age: Are You?</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/01/11/living-in-the-social-media-age-are-you.aspx</link><pubDate>Mon, 11 Jan 2010 23:20:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2765</guid><dc:creator>jwillinger</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2765</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/01/11/living-in-the-social-media-age-are-you.aspx#comments</comments><description>&lt;div class="post_body"&gt;
&lt;h2&gt;&lt;a href="http://mattroyse.wordpress.com/2009/09/20/living-in-the-social-media-age/" title="Permanent Link to Living in the Social Media&amp;amp;nbsp;Age"&gt;&lt;span style="color:#0080c3;"&gt;Living in the Social Media&amp;nbsp;Age&lt;/span&gt;&lt;/a&gt;: Are You?&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;More than 56% of marketers plan to incorporate social media into their businesses next year, according to a recent &lt;a target="_blank" href="http://www.bizreport.com/2009/09/social_media_on_marketers_menu_for_2010.html"&gt;&lt;span style="color:#0080c3;"&gt;survey&lt;/span&gt;&lt;/a&gt; by the Center for Media Research.
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With so many social media channel options to choose from, which one do you use for your marketing communications strategy?&lt;/p&gt;
&lt;p&gt;In July 2009, Russell Herder and Ethos Business Law &lt;a target="_blank" href="http://www.russellherder.com/SocialMediaResearch/%29"&gt;&lt;span style="color:#0080c3;"&gt;study&lt;/span&gt;&lt;/a&gt; of national business leaders highlighted that the most popular social media channels were the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.facebook.com/home.php"&gt;&lt;span style="color:#0080c3;"&gt;Facebook&lt;/span&gt;&lt;/a&gt; (80%)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://twitter.com/"&gt;&lt;span style="color:#0080c3;"&gt;Twitter &lt;/span&gt;&lt;/a&gt;(66%)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.youtube.com/"&gt;&lt;span style="color:#0080c3;"&gt;YouTube &lt;/span&gt;&lt;/a&gt;(55%)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.linkedin.com/"&gt;&lt;span style="color:#0080c3;"&gt;LinkedIn&lt;/span&gt;&lt;/a&gt; (49%)&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://blogsearch.google.com/"&gt;&lt;span style="color:#0080c3;"&gt;Blogs&lt;/span&gt;&lt;/a&gt; (43%)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In my first blog post, my audience confirmed that Facebook and Twitter were the most popular social media platforms.&amp;nbsp; So, as a marketer, should I use the most popular social media channel or a combination of both?&amp;nbsp; Well, the short answer is that it depends.&amp;nbsp; Since each tool works in a different way and with the social media landscape changing everyday, the key is to find out what your targeted audience likes to use.&lt;/p&gt;
&lt;p&gt;The bottom line is that you need to be a part of A conversation because these conversations are happening, whether you are in the social media game or not.&amp;nbsp; My next post will be focused more around SharePoint as that platform for an enterprise to build that social computing platform upon.&lt;/p&gt;
&lt;/p&gt;
&lt;div class="posterousGalleryMainDiv" id="HHnBugyxGf"&gt;&lt;img height="390" width="465" src="http://posterous.com/getfile/files.posterous.com/jwillie/vhsc5eoyq9yOBCy4oQvjFrqiX4PrFHidHTKKEqtY1qYv7Oq01EsS4tC13Es2/image001.gif" alt="" /&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;div class="comment-area" id="post_commentarea_9772133"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2765" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/twitter/default.aspx">twitter</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/YouTube/default.aspx">YouTube</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/LinkedIN/default.aspx">LinkedIN</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Facebook/default.aspx">Facebook</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Blogs/default.aspx">Blogs</category></item><item><title>401 Reasons Why SharePoint Web Services Don't Work Anonymously</title><link>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/01/07/401-reasons-why-sharepoint-web-services-don-t-work-anonymously.aspx</link><pubDate>Thu, 07 Jan 2010 07:43:00 GMT</pubDate><guid isPermaLink="false">f7450ba4-a08e-465a-831a-f9a15c21b696:2762</guid><dc:creator>Chris Domino</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.rightpoint.com/community/blogs/viewpoint/rsscomments.aspx?PostID=2762</wfw:commentRss><comments>http://www.rightpoint.com/community/blogs/viewpoint/archive/2010/01/07/401-reasons-why-sharepoint-web-services-don-t-work-anonymously.aspx#comments</comments><description>&lt;p class="Text"&gt;&lt;span class="Rant"&gt;&amp;lt;RANT&amp;gt;&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;I am always weary of using third party controls in my solutions. I feel that the risk of slightly reinventing the wheel is much less severe than that of getting to the end of project and realizing that some minor requirement that the control in use doesn&amp;#39;t support will become a show stopper. When you don&amp;#39;t have 100% control over your functionality (or the time/budget to customize open source code) then you had better make damn sure your third party components either &lt;span class="Bold"&gt;FIT PERFECTLY&lt;/span&gt; or that your client won&amp;#39;t mind cutting features. &lt;/p&gt;
&lt;p class="Text"&gt;That&amp;#39;s why when I party with SharePoint, it&amp;#39;s always &amp;quot;first party.&amp;quot; Who wants to go to a &lt;span class="Italic"&gt;third&lt;/span&gt; party when the first party is way cooler? &lt;/p&gt;
&lt;p class="Text"&gt;&lt;span class="Rant"&gt;&amp;lt;/RANT&amp;gt;&lt;/span&gt; &lt;/p&gt;
&lt;p class="Text"&gt;That said, I ran into such an issue in my last project. We were using a third party tool that, at the 11th hour (or, more accurately, around 9:45) immediately failed when we were informed that its SharePoint site had to be anonymous. Now our client probably pushed this requirement to the back burner because the functionality of this component had nothing to do with authorization. (I am purposely not going to share which component it is, because, well, I&amp;#39;m not a douche.) &lt;/p&gt;
&lt;p class="Text"&gt;The problem is that OOTB SharePoint web services, at least the ones this web part was calling, do not support anonymous access. The two in question here are SiteData.asmx and List.asmx. However, the depth of this unsupportedness far exceeded my expectations - as you&amp;#39;ll see. &lt;/p&gt;
&lt;p class="Text"&gt;The client first noticed the problem when &amp;quot;random pages&amp;quot; would challenge for credentials exactly twice, which is of course two more times than an anonymous site should challenge anyone. These random pages were of course the ones containing the web part in question. So I fired up &lt;a target="_blank" href="http://fiddler2.com/fiddler2/" class="Link"&gt;Fiddler&lt;/a&gt; and immediately saw the two 401s resulting from calls to the aforementioned web services. &lt;/p&gt;
&lt;p class="Text"&gt;&amp;quot;Easy fix,&amp;quot; I thought as I remoted into the server and fired up IIS. Once there, I navigated to the web site corresponding to the web app in question, expanded it, and set the _vti_bin virtual directory to anonymous, using the app pool identity for impersonation. &lt;/p&gt;
&lt;p class="Text"&gt;And shazzam, no more challenges! &lt;/p&gt;
&lt;p class="Text"&gt;Now the next day, heading to the status meeting, I prepared myself for praise and glory resulting from my victory over yet another third party control&amp;#39;s nonsensical way of doing things. I mean, come on! This is a web part; this is server side code. ALWAYS. Why call the web services? Why not just use the API? If this was our code, I could just fix it, or at least have an arch-to-arch heart-to-heart and inquire as to why this was the chosen method, as there could have been some weird requirement or dependency of doing things that way. &lt;/p&gt;
&lt;p class="Text"&gt;But I&amp;#39;m a consultant. Every project is an edge case in some way. That&amp;#39;s why third party controls fail me so often. &lt;/p&gt;
&lt;p class="Text"&gt;So I sat down at the meeting, and was immediately informed that, despite the lack of challenges, there was still &amp;quot;something wrong&amp;quot; with the web part. It was scarcely noticeable, but still not right. So I went back to Fiddler, and indeed saw that 401s were still being returned. Looking into the raw HTTP, I noticed that only one line of text was being returned: &amp;quot;401 UNAUTHORIZED.&amp;quot; &lt;/p&gt;
&lt;p class="Text"&gt;I then flipped _vti_bin back to Windows auth, and saw the challenges again. Back in Fiddler - and here&amp;#39;s the interesting part - I saw the familiar markup of IE&amp;#39;s default 401 error page! This makes sense; IIS wants windows credentials, IE didn&amp;#39;t give it any, so it returns a 401, and the web service call fails and dies quietly. &lt;/p&gt;
&lt;p class="Text"&gt;But when anonymous is set, we get that one line message: &amp;quot;401 UNAUTHORIZED.&amp;quot; Obviously, this is not coming from IIS. My only guess, after going through the trouble of &lt;a target="_blank" href="http://www.red-gate.com/products/reflector/" class="Link"&gt;Reflecting&lt;/a&gt; what I could of Microsoft.SharePoint.dll, is that code inside the web method sends this response if the current user is not authenticated, regardless if it&amp;#39;s virtual directory is set to be anonymous. Here&amp;#39;s what I dug up in Reflector: &lt;/p&gt;
&lt;p class="Text"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Image"&gt;&lt;img src="http://chrisdomino.com/content/images/401-Reasons-Why-SharePoint-Web-Services-Dont-Work-Anonymously/Reflector.jpg" class="Image" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="Text"&gt;Note: I couldn&amp;#39;t get the actual web service code loaded into Reflector, so I can&amp;#39;t be sure about this assumption. I tried OWSSVR.dll, which lives in the ISAPI folder in the SharePoint hive, but Reflector couldn&amp;#39;t load it since it does not contain a CLI header. &lt;/p&gt;
&lt;p class="Text"&gt;So that&amp;#39;s&amp;nbsp;a dead end: it appears as though the OOTB SharePoint web services explicitly send 401 responses even if their virtual directory is set to be anonymous. This is certainly, IMHO, another knock against using them for anything server side. Maybe that&amp;#39;s why it was so hard to get them to work in InfoPath 2003... &lt;/p&gt;
&lt;p class="Text"&gt;However, SharePoint 2010 is upon us! Next step: see if this is still an issue in the new product. &lt;/p&gt;
&lt;p class="Text"&gt;Stay tuned! &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.rightpoint.com/community/aggbug.aspx?PostID=2762" width="1" height="1"&gt;</description><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/SharePoint+2007/default.aspx">SharePoint 2007</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Anonymous/default.aspx">Anonymous</category><category domain="http://www.rightpoint.com/community/blogs/viewpoint/archive/tags/Web+Service/default.aspx">Web Service</category></item></channel></rss>