<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5760703966775804012</id><updated>2012-01-29T18:54:24.874-08:00</updated><category term='xml'/><category term='wiki'/><category term='onestride'/><category term='office'/><category term='tools'/><category term='javascript'/><category term='site definition'/><category term='talk'/><category term='silverlight'/><category term='security'/><category term='development'/><category term='wcm'/><category term='sharepoint 2010'/><category term='UI'/><category term='hosting'/><category term='customisation'/><category term='WCF Data Services'/><category term='data view'/><category term='list view'/><category term='earthquake'/><category term='Virtual machine'/><category term='JQuery'/><category term='timer job'/><category term='sharepoint'/><category term='css'/><category term='configuration'/><category term='powershell'/><category term='administration'/><category term='custom field'/><category term='OData'/><category term='errors'/><category term='web service'/><category term='coding'/><category term='features'/><category term='search'/><category term='operations'/><category term='asp.net'/><category term='design'/><category term='web parts'/><category term='fix'/><category term='testing'/><category term='architecture'/><category term='deploy'/><title type='text'>Share The Learning</title><subtitle type='html'>Discoveries, glimpses, insights, and links to useful stuff about SharePoint and software development in general.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default?start-index=101&amp;max-results=100'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>136</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-1236815624925611707</id><published>2012-01-17T13:54:00.000-08:00</published><updated>2012-01-17T13:54:45.492-08:00</updated><title type='text'>HTML5 Learnings - Getting IE9 to Accept Canvas Elements</title><content type='html'>Working with HTML5 at the moment is a lot like the "good old days" of designing pages to work in IE, then redoing the page for Navigator (oooh, showing my age in the industry there!)&lt;br /&gt;&lt;br /&gt;Anyhows, today's little lesson was about a small subtly in IE9 behaviour when handling a page incorporating Canvas elements. Initial I was working on the page in Web Expression, and viewing the page via a "file://..." path in the IE9 address bar. All was fine, and the JavaScript rendering the canvas element content worked OK.&lt;br /&gt;&lt;br /&gt;But then I copied the HTML into a page being served up through IIS, and accessed via an "http://..." address. Looking at this new page, IE9 now tells me that the canvas element is not supported (modernizr adding the "&lt;strong&gt;no-canvas&lt;/strong&gt;" class to the html element). Weird. Much playing later, found that it is necessary to add the following header metatag to the page:&lt;br /&gt;&lt;br /&gt;&amp;lt;meta http-equiv="X-UA-Compatible" content="IE=Edge"/&amp;gt;&lt;br /&gt;&lt;br /&gt;Seems that IE treats pages accessed from the file-system differently that those from an http address!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-1236815624925611707?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/1236815624925611707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=1236815624925611707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1236815624925611707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1236815624925611707'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2012/01/html5-learnings-getting-ie9-to-accept.html' title='HTML5 Learnings - Getting IE9 to Accept Canvas Elements'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7276648571104030078</id><published>2012-01-04T20:57:00.000-08:00</published><updated>2012-01-04T20:57:09.200-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Setting BCS Secondary Fields Programmatically in SharePoint 2010</title><content type='html'>Phew, that was quite a battle. I have been writing some&amp;nbsp;code to import values from a CSV file into some custom lists in SharePoint (I realise that there are, of course, plenty of other ways to import into SharePoint, such as using PowerShell or a third party app., but specific needs call for special handling), and one of the requirements is to import data into External Columns in the SharePoint list.&lt;br /&gt;&lt;br /&gt;Original this process used the GetSecondaryFieldNames() method of the SPBusinessDataField instance to get the internal names of each of the secondary fields, and then combined each of those with the internal name of the SPBusinessDataField to create the displayname value for each secondary field. The list item fields could then be set using these displayname values.&lt;br /&gt;&lt;br /&gt;This worked fine in the dev environment... but of course the real workd is different! Researching the failure of this process&amp;nbsp;on the target machine&amp;nbsp;showed that the display names for the secondary fields did not contain the values from the GetSecondaryFieldNames() call (PowerShell allowed me to easily view the Schema XML for the fields in the list, saving the need for a tool like SharePoint Manager).&lt;br /&gt;&lt;br /&gt;So, my solution was to seek the secondary field by enumerating through all fields in the list, seeking the field whose: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;"DisplayName" property value starts with the internal name of the related external data field &lt;/li&gt;&lt;li&gt;"BdcField" property value matches&amp;nbsp;a string value returned by GetSecondaryFieldNames()&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: Times New Roman;"&gt;This lets me find the required secondary BCS field, and gived me the GUID for use in later populating that field with a value. &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: Times New Roman;"&gt;I then make sure to cache this GUID, meaning on the next pass through this part of the code I can use the cached value rather than re-enumerating all the fields once again.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7276648571104030078?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7276648571104030078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7276648571104030078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7276648571104030078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7276648571104030078'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2012/01/setting-bcs-secondary-fields.html' title='Setting BCS Secondary Fields Programmatically in SharePoint 2010'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6390954096339283682</id><published>2011-10-25T15:44:00.000-07:00</published><updated>2011-10-25T15:44:40.988-07:00</updated><title type='text'>FileNotFoundException with "new SPSite" Call</title><content type='html'>This one came back to bite me again, so time to note it down here - when running any test code which accesses a SharePoint web or site using new SPSite(url)&amp;nbsp;in a console application, or in a Visual Studio 2010 test project, it is necessary to adjust the build properties of the project. &lt;br /&gt;&lt;br /&gt;The project build&amp;nbsp;configuration (the second tab down in the project properties)&amp;nbsp;need to have the Platform Target explicitly set to x64. If this target is set to x86, or possibly to "Any CPU"&amp;nbsp;then the call to "new SPSite" will fail with "FileNotFoundException", stating that "The web application cannot be found". Next time I'll remember...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6390954096339283682?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6390954096339283682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6390954096339283682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6390954096339283682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6390954096339283682'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/10/filenotfoundexception-with-new-spsite.html' title='FileNotFoundException with &quot;new SPSite&quot; Call'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2737283680792693404</id><published>2011-10-19T01:19:00.001-07:00</published><updated>2011-10-19T01:21:14.829-07:00</updated><title type='text'>Error in Visual Studio 2010 Packaging a SharePoint 2010 Solution</title><content type='html'>Was getting an error stating that a file "deploys to the same package location" when packaging a SharePoint 2010 solution in VIsual Studio 2010. &lt;br /&gt;&lt;br /&gt;Turns out that the SharePointProjectItem.spdata file (in the module subfolder within the Visual Studio project) had somehow gained duplicate entries for a particular file.&lt;br /&gt;To fix this,&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Unload the project in VS (or close the entire solution)&lt;/li&gt;&lt;li&gt;Find the SharePointProjectItem.spdata file in Windows Explorer, and edit in Notepad++ (or your favourite text editor!) to remove the duplicate reference&lt;/li&gt;&lt;li&gt;Reload the project in VS, and select that "Package" action - all then worked for me.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2737283680792693404?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2737283680792693404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2737283680792693404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2737283680792693404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2737283680792693404'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/10/error-in-visual-studio-2010-packaging.html' title='Error in Visual Studio 2010 Packaging a SharePoint 2010 Solution'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-8729777599259530892</id><published>2011-09-29T01:56:00.000-07:00</published><updated>2011-09-29T01:56:54.561-07:00</updated><title type='text'>Cannot Log in with Microsoft Lync</title><content type='html'>Took a while to track this one down - a fresh install of Lync refused to connect or login to Office 365. Experimented with adjusting the manual configuration settings as suggested by lots of posts, but to no avail. Finally found&amp;nbsp;a comment on a forum suggesting to check the time on the computer. The time was in fact a few minutes fast - so I set the time, restarted Lync, and login worked straight away. Who'd have thought?!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-8729777599259530892?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/8729777599259530892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=8729777599259530892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8729777599259530892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8729777599259530892'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/09/cannot-log-in-with-microsoft-lync.html' title='Cannot Log in with Microsoft Lync'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2853564039660965111</id><published>2011-09-13T15:53:00.000-07:00</published><updated>2011-09-13T15:53:07.892-07:00</updated><title type='text'>Cant Seem to Remove Columns from a Content Type in a Solution</title><content type='html'>Some behaviours in SharePoint 2010 solutions have become frustrating compared with SharePoint 2007 solutions. One that's particularly troublesome is attempting to modify site columns in a custom content type that inherits from a non-built in content type.&lt;br /&gt;&lt;br /&gt;When inheriting from a publishing article page content type using a solution,&amp;nbsp;&amp;nbsp;just can't seem to remove a couple of site column. Neither of the following approaches seems to work. If I come up with a solution, I'll add it hear.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #a31515; font-family: Consolas;"&gt;&lt;span style="color: #a31515; font-family: Consolas;"&gt;FieldRef&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas;"&gt;&lt;span style="color: red; font-family: Consolas;"&gt;ID&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;{d3429cc9-adc4-439b-84a8-5679070f84cb}&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas;"&gt;&lt;span style="color: red; font-family: Consolas;"&gt;Name&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;ArticleByLine&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas;"&gt;&lt;span style="color: red; font-family: Consolas;"&gt;Hidden&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;TRUE&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #a31515; font-family: Consolas;"&gt;&lt;span style="color: #a31515; font-family: Consolas;"&gt;RemoveFieldRef&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas;"&gt;&lt;span style="color: red; font-family: Consolas;"&gt;ID&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;{d3429cc9-adc4-439b-84a8-5679070f84cb}&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas;"&gt;&lt;span style="color: red; font-family: Consolas;"&gt;Name&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;ArticleByLine&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;"&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;span style="color: blue; font-family: Consolas;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2853564039660965111?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2853564039660965111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2853564039660965111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2853564039660965111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2853564039660965111'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/09/cant-seem-to-remove-columns-from.html' title='Cant Seem to Remove Columns from a Content Type in a Solution'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6488754787805254251</id><published>2011-09-13T14:47:00.000-07:00</published><updated>2011-09-13T14:47:54.984-07:00</updated><title type='text'>Shrinking the SharePoint Log FIle (for dev machines)</title><content type='html'>Found some useful information on taming a large log file - useful on a SharePoint development machine.&lt;br /&gt;&lt;br /&gt;To&amp;nbsp;shrink log files in sql server 2008, first change the recovery model of database to simple, then shrink the log file and&amp;nbsp;finally change back to the previous recovery model. Here is the SQL:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;USE dbname;&lt;/div&gt;&lt;div&gt;&lt;div&gt;GO&lt;/div&gt;&lt;div&gt;-- Truncate the log by changing the database recovery model to SIMPLE.&lt;/div&gt;&lt;div&gt;ALTER DATABASE dbname&lt;/div&gt;&lt;div&gt;SET RECOVERY SIMPLE;&lt;/div&gt;&lt;div&gt;GO&lt;/div&gt;&lt;div&gt;-- Shrink the truncated log file to 1 MB.&lt;/div&gt;&lt;div&gt;DBCC SHRINKFILE (2, 1);  -- here 2 is the file ID for trasaction log file,you can also mention the log file name (dbname_log)&lt;/div&gt;&lt;div&gt;GO&lt;/div&gt;&lt;div&gt;-- Reset the database recovery model.&lt;/div&gt;&lt;div&gt;ALTER DATABASE dbname&lt;/div&gt;&lt;div&gt;SET RECOVERY FULL;&lt;/div&gt;&lt;div&gt;GO&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Thanks to &lt;a href="http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/54e6e281-005a-4b07-8c85-3685441f4f3d"&gt;an answer&lt;/a&gt; by RTTAdmin on the MSDN forums for that suggestion.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6488754787805254251?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6488754787805254251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6488754787805254251' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6488754787805254251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6488754787805254251'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/09/shrinking-sharepoint-log-file-for-dev.html' title='Shrinking the SharePoint Log FIle (for dev machines)'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2455086393676281978</id><published>2011-09-12T14:03:00.000-07:00</published><updated>2011-09-12T14:03:23.361-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='timer job'/><title type='text'>SharePoint 2010 Timer Job Journey of Discovery - Updating Web App Properties</title><content type='html'>So there I was, creating a SharePoint 2010 Timer Job to retrieve and aggregate tag information from the Social Data Service. Using a pattern that worked well in SharePoint 2007, the feature receiver in the solution was tailored to save information for&amp;nbsp;each&amp;nbsp;execution of&amp;nbsp;the job to the property bag of the web application.&lt;br /&gt;But the timer job failed to register when activating this solution through the features admin page on the site. The event log showed an "Access denied" SecurityException&amp;nbsp;error, occuring in the call to SPWebApplication.Update(). The code was simply attempting to set a web application property at that stage.&lt;br /&gt;&lt;br /&gt;Time passes... Lots of experimentation and research.... Finally discovered the cause is related to applying least privileges access to accounts on the server install.&amp;nbsp;The account under which the feature gets activated when clicking on "Activate" in the browser UI does not have sufficient rights to make changes in the configuration database. And web application property bag settings seem to be saved to the configuration database rather than to a content database (makes sense, I guess, as a web app can be associated with multiple content databases).&lt;br /&gt;&lt;br /&gt;The solution therefore&amp;nbsp;is to activate the feature using PowerShell whilst logged in&amp;nbsp;with an account&amp;nbsp;having&amp;nbsp;update rights on the config database - for instance, using the setup account (which you used during installation, of course, didn't you?!)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2455086393676281978?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2455086393676281978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2455086393676281978' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2455086393676281978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2455086393676281978'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/09/sharepoint-2010-timer-job-journey-of.html' title='SharePoint 2010 Timer Job Journey of Discovery - Updating Web App Properties'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7793363537916511374</id><published>2011-08-11T17:08:00.000-07:00</published><updated>2011-08-11T17:18:09.253-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='fix'/><title type='text'>Secure Store Application Error 8306</title><content type='html'>After much experimenting on the SharePoint 2010 server, following tips on the "Claims to Windows Tokens Service" and the settings of the SecurityTokenServiceApplication web service site, finally found that the 8306 error being frequently logged was due to Forms Authentication being enabled in the SecurityTokenServiceApplication web service site. Disabling Forms Authentication removed the issue on the Secure Store Service Application management page in Central Admin&lt;br /&gt;&lt;br /&gt;To check this setting, open IIS Admin, browse in the left-hand pane to Sites &amp;gt; SharePoint Web Services &amp;gt; SecurityTokenService Application, and in the IIS section in the right-hand pane open the "Authentication" settings. Only "Anonymous Authentication" and "Windows Authentication" should be enabled.&lt;br /&gt;&lt;br /&gt;The 8306 error in the event log was : "An exception occurred when trying to issue security tokens". Thanks to the threads at &lt;a href="http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/49508c3a-e44b-4b3a-ad94-0e9957b9e025/"&gt;http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/49508c3a-e44b-4b3a-ad94-0e9957b9e025/&lt;/a&gt; and &lt;a href="http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/580a6e7a-e26e-47aa-a6d8-51563b7d27de/"&gt;http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/580a6e7a-e26e-47aa-a6d8-51563b7d27de/&lt;/a&gt; for the final bit of assistance in tracing this one.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7793363537916511374?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7793363537916511374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7793363537916511374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7793363537916511374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7793363537916511374'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/08/secure-store-application-error-8306.html' title='Secure Store Application Error 8306'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6910220582151646345</id><published>2011-06-20T13:06:00.000-07:00</published><updated>2011-06-20T14:55:10.810-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Watch your Ports When Configuring AAMs</title><content type='html'>Found (the hard way) that SharePoint 2010 is not happy when an Alternate Access Mapping is configured with a port on the public URL that is different than the port on the corresponding Internal URLs.&lt;br /&gt;&lt;br /&gt;For an extranet I was creating using SharePoint Foundation 2010, we were using port 80 on the external-facing side of the firewall. The firewall was redirecting those calls to port 81 on an internal IP address. So I had setup the extranet zone in AAM to have [some site]:80 as the public URL, and [some internal ip address]:81 as an Internal URL in that same zone.&lt;br /&gt;&lt;br /&gt;[Various reasons for not using host headers in this instance, and for using port 81 for the SharePoint web app!]&lt;br /&gt;&lt;br /&gt;Could access the site inside the firewall, but failed to get to the SharePoint pages from outside. Much analysis using Fiddler and the MS Network Monitor 3.4 (great tool, that one - really easy parsing of results) revealed that something was redirecting the client from [some site]:80 to [some site]:81 for the external calls. Still don't know whether IIS or SharePoint was responsible for this - just know that by changing the firewall to pass through on port 81, and calling [some site]:81 from outside, then all was well again.&lt;br /&gt;&lt;br /&gt;So what I learnt today - don't mix ports across AAM internal and external URLs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6910220582151646345?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6910220582151646345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6910220582151646345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6910220582151646345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6910220582151646345'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/06/watch-your-ports-when-configuring-aams.html' title='Watch your Ports When Configuring AAMs'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-8803713171954268783</id><published>2011-06-01T13:02:00.001-07:00</published><updated>2011-06-01T13:03:00.004-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><title type='text'>Refinement Filtering in the SharePoint Search URL</title><content type='html'>The refinement filter querystring is the "&lt;strong&gt;r&lt;/strong&gt;" term in a search result page URL. An example of its use is&lt;br /&gt;&lt;br /&gt;&lt;div style="PADDING-LEFT: 20px"&gt;http://intranet/search/pages/phonelist.aspx?k=christchurch&amp;amp;r=department%3a%22Human%20Resources%22&lt;/div&gt;&lt;br /&gt;The value of the “&lt;strong&gt;r&lt;/strong&gt;” term in the querystring decodes to&lt;br /&gt;&lt;br /&gt;&lt;div style="PADDING-LEFT: 20px"&gt;Department:”Human Resources”&lt;/div&gt;&lt;br /&gt;Some documentation (and the links generated by the refiner web part) use a “=” character, but in my experimentation it seemed that only the “:” character would return results. Further research has shown that the “:” (%3A) character denotes a “contains” comparison whereas “=”(%3D) not surprisingly means “equals” (and yet the “equals” operation does not seem to retrieve any results in my trials)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-8803713171954268783?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/8803713171954268783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=8803713171954268783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8803713171954268783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8803713171954268783'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/06/refinement-filtering-in-sharepoint.html' title='Refinement Filtering in the SharePoint Search URL'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7493688079699342813</id><published>2011-04-10T21:33:00.000-07:00</published><updated>2011-04-10T21:42:38.963-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><title type='text'>Finding the SharePoint Site Collection URL on the Client</title><content type='html'>Little tip - if your client-side code needs to know the URL of the site collection hosting a SharePoint page, have a look at the properties of the _spPageContextInfo object in the HTML source of the page. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This JavaScript object is written into each page, and contains useful information about that page. For my requirement, the _spPageContextInfo.siteServerRelativeUrl property contains the value I needed.&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7493688079699342813?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7493688079699342813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7493688079699342813' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7493688079699342813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7493688079699342813'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/04/finding-sharepoint-site-collection-url.html' title='Finding the SharePoint Site Collection URL on the Client'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-5872085780874699053</id><published>2011-04-10T21:16:00.001-07:00</published><updated>2011-04-10T21:29:24.871-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='onestride'/><title type='text'>Simple Glossary App (Beta) for SharePoint Released</title><content type='html'>&lt;div&gt;Have just published details of a new simple glossary/theasaurus application for SharePoint - &lt;a href="http://www.smallsteps.co.nz/onestride.aspx"&gt;OneStride Define&lt;/a&gt;. The idea behind this, and other layers planned for the framework, is to offer a way to layer interactivity and information on top of existing SharePoint pages.&lt;br /&gt;&lt;br /&gt;No need to modify pages that already refer to a word that needs to be clearly defined - just add that word to a dedicated list in SharePoint, and any occurrence of that word in published pages or text fields in lists will be linked to the definition. Nice n' simple.&lt;br /&gt;&lt;img alt="Highlighted Term On SharePoint Page" src="http://www.smallsteps.co.nz/images/Highlighted%20Term%20On%20SharePoint%20Page.png" /&gt;&lt;br /&gt;&lt;br /&gt;An additional benefit is that the framework and this first "layer" are supplied as sandboxed solutions, meaning that they can be deployed through the browser, run isolated from the rest of SharePoint and are suitable for use in hosted SharePoint (Office 365 here we come!).&lt;br /&gt;&lt;br /&gt;This beta will be available until the end of May 2011. Have a look and let me know what you think!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-5872085780874699053?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/5872085780874699053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=5872085780874699053' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5872085780874699053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5872085780874699053'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/04/simple-glossary-app-beta-for-sharepoint.html' title='Simple Glossary App (Beta) for SharePoint Released'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-1135436506850831838</id><published>2011-03-02T16:53:00.001-08:00</published><updated>2011-03-02T16:57:06.323-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='earthquake'/><title type='text'>Help for Businesses in Quake-striken Christchurch, NZ</title><content type='html'>Am gathering links to sites and pages dedicated to assisting businesses in recovering and rebuilding in Christchurch, New Zealand - the page is at &lt;a href="http://www.smallsteps.co.nz/restart.aspx"&gt;http://www.smallsteps.co.nz/restart.aspx&lt;/a&gt; . If you find any other sites that are of value to our businesses, please let me know through a comment to this post.&lt;br /&gt;&lt;br /&gt;If you are interested in seeing Twitter in action in an event like this, search for tweets containing #eqnz.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-1135436506850831838?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/1135436506850831838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=1135436506850831838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1135436506850831838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1135436506850831838'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2011/03/help-for-businesses-in-quake-striken.html' title='Help for Businesses in Quake-striken Christchurch, NZ'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-499289309219713558</id><published>2010-12-20T19:23:00.000-08:00</published><updated>2010-12-20T19:35:22.737-08:00</updated><title type='text'>JSON, jQuery, IE, OData and a Parsererror</title><content type='html'>Quite a collection of technologies and approaches in that combination being used on a single page in SharePoint - mostly worked fine until I had deployed to a site using IE7. Suddenly my jQuery calls to $.getJSON() would silently fail, and with no error callback on the getJSON method, I resorted to an $.ajax call instead.&lt;br /&gt;&lt;br /&gt;Experimenting in the error callback, found that even though the response status was success, there was an error - the error text was "parsererror". Seems that IE7's native parsing of JSON does behave too well for jQuery 1.4.2. Finally wrote some code in the error callback to detect when the err was parsererror, and in that instance to create a new JSON object using eval, similar to this:&lt;br /&gt;&lt;br /&gt;        $.ajax({&lt;br /&gt;              type: 'GET',&lt;br /&gt;              url: serviceUrl,&lt;br /&gt;              contentType: 'application/json: charset=utf-8',&lt;br /&gt;              dataType: "json",&lt;br /&gt;              success: ProcessResults,&lt;br /&gt;              error: function (xhr, textStatus, errThrown) {&lt;br /&gt;                if (textStatus == 'parsererror') {&lt;br /&gt;                    var json;&lt;br /&gt;                    try { json = eval('(' + xhr.responseText + ')'); }&lt;br /&gt;                    catch (e) {  }&lt;br /&gt;                    ProcessResults(json);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        });&lt;br /&gt;&lt;br /&gt;After working out this fix, I found some information on &lt;a href="http://stackoverflow.com/questions/2439420/ie7-not-digesting-json-parse-error-resolved"&gt;stackoverflow&lt;/a&gt; suggesting that IE has problems with leading new line characters at the start of the JSON in the HTTP response body.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-499289309219713558?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/499289309219713558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=499289309219713558' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/499289309219713558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/499289309219713558'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/12/json-jquery-ie-odata-and-parsererror.html' title='JSON, jQuery, IE, OData and a Parsererror'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-636925532095675738</id><published>2010-12-09T11:53:00.000-08:00</published><updated>2010-12-09T12:02:15.618-08:00</updated><title type='text'>SharePoint Designer and generate-id</title><content type='html'>Just wanted to note down a great tip from &lt;a href="http://sympmarc.com/"&gt;Marc D Anderson&lt;/a&gt; (who derived the idea from a post by Jorge Vasquez) on how to work around the annoyance of SharePoint Designer 2007 inserting generate-id() statements into the ID attributes of HTML tags in customised XSL in SharePoint 2007 or WSS3 pages.&lt;br /&gt;&lt;br /&gt;The small steps to applying this fix are as follows:&lt;br /&gt;1. Create an empty dummy variable in the XSL , for example&lt;br /&gt;     &amp;lt;xsl:variable name="DummyVar"&gt;&lt;br /&gt;2. Append this dummy parameter to any IDs, e.g.&lt;br /&gt;    &amp;lt;input id="myid{$DummyVar}" type=......&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-636925532095675738?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/636925532095675738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=636925532095675738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/636925532095675738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/636925532095675738'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/12/sharepoint-designer-and-generate-id.html' title='SharePoint Designer and generate-id'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-8926997604453794468</id><published>2010-10-14T12:44:00.000-07:00</published><updated>2010-10-14T12:57:53.033-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF Data Services'/><category scheme='http://www.blogger.com/atom/ns#' term='OData'/><title type='text'>WCF Data Service "Could not load file or assembly App_Web" Error</title><content type='html'>The "Could not load file or assembly App_Web_" error was showing sporadically on a small test WCF Data Service site.&lt;br /&gt;&lt;br /&gt;In my first attempt to solve the issue, I deleted all files in the site, and copied the site files from a deployment package. The data service magically started working.&lt;br /&gt;&lt;br /&gt;Later in the day, the same error returned. After researching on the web, came across &lt;a href="http://codebetter.com/blogs/brendan.tompkins/archive/2006/11/15/Fix-for-ASP.NET-_2200_Could-not-load-file-or-assembly-App_5F00_Web_2E00__2E00_._2200_-Error.aspx"&gt;one lead&lt;/a&gt; that suggested deleting all the ASP.Net temporary files. Other posts mentioned issues with compilation. Therefore, as an experiment I adjusted the Web.Config file of the site so that the Compilation node had the following attributes:&lt;br /&gt;&lt;br /&gt;        debug="false" batch="false"&lt;br /&gt;&lt;br /&gt;And this seems to have solved the issue for me - I think each recycle of the Application Pool was causing an attempt to recompile, which was failing for some reason. Probably relates to the other post with regard to some issue around the ASP.Net temporary files folder.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/s10awwz0.aspx"&gt;Batch compilation&lt;/a&gt; isn't really necessary for this small app, so game over!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-8926997604453794468?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/8926997604453794468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=8926997604453794468' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8926997604453794468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8926997604453794468'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/10/wcf-data-service-could-not-load-file-or.html' title='WCF Data Service &quot;Could not load file or assembly App_Web&quot; Error'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-5120538731946500650</id><published>2010-10-10T11:29:00.000-07:00</published><updated>2010-10-10T11:36:25.117-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><title type='text'>Web Application with Host Header on Port 80 Fails</title><content type='html'>Adding new SharePoint web applications on port 80 is easy by associating a host header name, but I was unable to view the site collection in the new web application with IE - the login dialog box would show three times, and then just a blank page, even though my account was the primary site collection administrator.&lt;br /&gt;&lt;br /&gt;Turns out that in Windows 2008 R2 it is necessary to disable the loopback check. Open the Powershell ISE or console (as administrator to get sufficient registry permissions!) and run the following script:&lt;br /&gt;&lt;br /&gt;New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -PropertyType dword&lt;br /&gt;&lt;br /&gt;Thanks to Ignacio Montenegro of IGA Systems for that tip.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-5120538731946500650?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/5120538731946500650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=5120538731946500650' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5120538731946500650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5120538731946500650'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/10/web-application-with-host-header-on.html' title='Web Application with Host Header on Port 80 Fails'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-911020895238774839</id><published>2010-09-30T13:24:00.000-07:00</published><updated>2010-09-30T13:31:00.185-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><title type='text'>Where's the "Configure Incoming Email Settings" Link?</title><content type='html'>If you cannot see the "Configure incoming e-mail settings" link in SharePoint 2010 central administration, and are sure you have all the permissions you require, try right-clicking on an IE icon and selecting "Run as administrator" from the context menu. In that instance of Internet Explorer, you may well see the link you are seeking!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-911020895238774839?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/911020895238774839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=911020895238774839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/911020895238774839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/911020895238774839'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/09/wheres-configure-incoming-email.html' title='Where&apos;s the &quot;Configure Incoming Email Settings&quot; Link?'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6325866512309805191</id><published>2010-09-16T15:30:00.000-07:00</published><updated>2010-09-16T15:32:56.419-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='administration'/><title type='text'>Access Denied for Configure Service Accounts Link</title><content type='html'>Clicking on the "Configure Service Accounts" link on a SharePoint 2010 server resulted in an "Access Denied" message.&lt;br /&gt;&lt;br /&gt;Resolution of this issue is to run IE with Elevated Permissions by right clicking on an IE shortcut and selecting "Run as administrator"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6325866512309805191?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6325866512309805191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6325866512309805191' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6325866512309805191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6325866512309805191'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/09/access-denied-for-configure-service.html' title='Access Denied for Configure Service Accounts Link'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6276946219476416286</id><published>2010-09-03T02:14:00.000-07:00</published><updated>2010-09-03T02:41:58.955-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><title type='text'>At Last - Tame the Core CSS FIle!</title><content type='html'>Thanks to the blog of &lt;a href="http://singchan.com/2009/12/29/branding-sharepoint-2010-collaboration-sites-part-2-in-a-series/"&gt;buta no le&lt;/a&gt;, I could solve that nasty issue of corev4.css being placed after my custom CSS file when using the SharePoint.CSSRegistration tag.&lt;br /&gt;&lt;br /&gt;The reason I want to use that tag is that it allows the use of tokens to derive the actual site collection URL (as opposed to having to hard code the URL, and then editing the masterpage on the client site). In MOSS, SharePoint.CSSRegistration always places the core CSS file at the end of all the registered CSS files, thereby rendering useless any style overrides in your own files.&lt;br /&gt;&lt;br /&gt;But SharePoint 2010 adds the "After" attribute to the tag. Nice! Now I can insert the following in the masterpage, and dictate my own styles over the core ones (note that the name actually needs to be enclosed in angle brackets!)&lt;br /&gt;&lt;style type="text/css"&gt;.cf { font-family: Courier New; font-size: 10pt; color: black; background: white; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: #a31515; }.cb3 { color: red; }&lt;br /&gt;    .style1&lt;br /&gt;    {&lt;br /&gt;        background-color: #FFFF66;&lt;br /&gt;    }&lt;br /&gt;    .style2&lt;br /&gt;    {&lt;br /&gt;        background-color: #FFFF00;&lt;br /&gt;    }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;div class="cf"&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;&lt;/span&gt;&lt;span class="cb2"&gt;SharePoint:CSSRegistration&lt;/span&gt;&lt;span class="cb1"&gt;&lt;/span&gt;&lt;span class="cb3"&gt;Name&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="style2"&gt;%&lt;/span&gt; $SPUrl:~sitecollection/style library/state.css&lt;br /&gt;    &lt;span class="style1"&gt;%&lt;/span&gt;" &lt;span class="cb3"&gt;After&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;corev4.css"&lt;/span&gt;&lt;span class="cb1"&gt; &lt;span class="cb3"&gt;Runat&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;server"&lt;/span&gt;/&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6276946219476416286?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6276946219476416286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6276946219476416286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6276946219476416286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6276946219476416286'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/09/at-last-tame-core-css-file.html' title='At Last - Tame the Core CSS FIle!'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4445806166946892759</id><published>2010-09-01T16:12:00.000-07:00</published><updated>2010-09-01T16:14:08.206-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web service'/><title type='text'>Where is disco.exe?</title><content type='html'>Just been searching for this web service tool, so to save the effort of the hunt next time, here's the location of the folder holding the file:&lt;br /&gt;&lt;br /&gt;C:\Program Files\Microsoft SDKs\Windows\V6.0A\Bin\disco.exe&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4445806166946892759?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4445806166946892759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4445806166946892759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4445806166946892759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4445806166946892759'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/09/where-is-discoexe.html' title='Where is disco.exe?'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4636755408230686062</id><published>2010-08-30T18:24:00.000-07:00</published><updated>2010-08-30T18:30:03.422-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='powershell'/><title type='text'>PowerShell PS1 File Not Recognised as the Name of ....</title><content type='html'>Annoying wee behaviour - if calling a PowerShell file from a batch file, it seems that even if the BAT and PS1 files are in the same folder, and the BAT file has changed the current path to be that folder, it is still necessary to include the whole path to the PS1 file in the -command call.&lt;br /&gt;&lt;br /&gt;The statements&lt;br /&gt;      cd [the folder path]&lt;br /&gt;      powershell -command "&amp;amp;{.\test.ps1}"&lt;br /&gt;didn't work, whereas the following does work:&lt;br /&gt;      cd [the folder path]&lt;br /&gt;      powershell - command "&amp;amp;{[the folder path]\test.ps1}"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4636755408230686062?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4636755408230686062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4636755408230686062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4636755408230686062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4636755408230686062'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/08/powershell-ps1-file-not-recognised-as.html' title='PowerShell PS1 File Not Recognised as the Name of ....'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7970803848204537373</id><published>2010-07-27T15:46:00.000-07:00</published><updated>2010-07-27T15:58:46.588-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><title type='text'>SP2010 - Get the Item ID from the OpenPopUpPage  Link</title><content type='html'>Just wanted to record here a simple little jQuery script useful for retrieving the item ID from the OpenPopUpPage hyperlink that is rendered for lookup column values in a Data View Web Part in SharePoint 2010. The useful thing about this is that you can then manipulate the action of the hyperlink to pass this item id to a different page - without having to look at changing the field type in any way.&lt;br /&gt;&lt;br /&gt;The lookup field is rendered in a DVWP with the following onclick action:&lt;br /&gt;&lt;br /&gt;OpenPopUpPage( 'http://blah/_layouts/listform.aspx?PageType=4&amp;amp;ListId={FFFC7FEA-62B2-459F-9D1B-80B6CA3608FF}&amp;amp;ID=23&amp;amp;RootFolder=*',  RefreshPage);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The XSL (in the DVWP) that is rendering this lookup value is as follows:&lt;br /&gt;&lt;br /&gt;&lt;tr class="ms-alternatingstrong"&gt;     &lt;br /&gt;   &lt;td class="ms-vb detailsviewfieldtitle"&gt;Trust Partner:&lt;/td&gt;     &lt;br /&gt;   &lt;td class="ms-vb detailsviewfieldvalue linktoentitydetails"&gt;      &lt;br /&gt;      &lt;xsl:value-of select="@TrustPartner" escaping="yes"&gt;     &lt;br /&gt;   &lt;/td&gt;    &lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;[An aside: "table-based HTML?" you may ask. Well, sometimes expedience wins over web standards, though I am usually a standards-based advocate!]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The jQuery script to extract and use the item ID is:&lt;br /&gt;&lt;br /&gt;$(function() {&lt;br /&gt;   $('.linktoentitydetails').each(function() {  &lt;br /&gt;      var $link = $(this).find('a');  &lt;br /&gt;      var href = $link.attr('href'); &lt;br /&gt;      if (href != '') {  &lt;br /&gt;         var itemIdMatches = href.match(/.*&amp;amp;id=(\d+)&amp;amp;.+/i)  &lt;br /&gt;         if (itemIdMatches.length == 2) {   &lt;br /&gt;            var itemId = itemIdMatches[1];   &lt;br /&gt;            $link.removeAttr('onclick');   &lt;br /&gt;            $link.attr('href', 'persondetails.aspx?eid=' + itemId);  &lt;br /&gt;         } &lt;br /&gt;      }&lt;br /&gt;   });&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;So, in this case, I am replacing the OpenPopUpPage hyperlink action with a simple link to a custom page (persondetails.aspx) on which I can present other information about this linked item.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7970803848204537373?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7970803848204537373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7970803848204537373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7970803848204537373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7970803848204537373'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/07/sp2010-get-item-id-from-openpopuppage.html' title='SP2010 - Get the Item ID from the OpenPopUpPage  Link'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-1426691074582083405</id><published>2010-05-29T03:56:00.000-07:00</published><updated>2010-05-29T04:08:20.567-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>SharePoint Connection Error in Visual Studio 2010</title><content type='html'>When running Visual Studio 2010 on a Windows Server 2008 R2 / SQL Server 2008 / SharePoint 2010 development box, even though the logged-in account has local admin rights on the server, I still experienced a SharePoint Connection Error in Visual Studio 2010 on that same Virtual Machine. The text in the error dialog states that "the local SharePoint Server is not available".&lt;br /&gt;&lt;br /&gt;Seems the error is caused be the logged-in account having insufficient rights against the SharePoint databases. Log into the SQL Server using the administrator account, and grant rights to the developer account; db_owner rights on the SharePoint configuration and admin database is reported to be sufficient -but as in this instance I was dealing with a development virtual machine, I opted for the easy route of granting sysadmin role to the dev user account :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-1426691074582083405?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/1426691074582083405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=1426691074582083405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1426691074582083405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1426691074582083405'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/05/sharepoint-connection-error-in-visual.html' title='SharePoint Connection Error in Visual Studio 2010'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-8867498423486791965</id><published>2010-05-06T13:15:00.000-07:00</published><updated>2010-05-06T13:18:57.372-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>SPServices Error With GetListItems Call</title><content type='html'>If you get an error similar to "&lt;em&gt;Guid should contain 32 digits with 4 dashes&lt;/em&gt;" when making an SPServices Web Service call to the GetListItems operation, check the premissions on the list you are querying - I got this error returned from the call, and found that the list permissions were set so that the current user did not have read permissions.&lt;br /&gt;&lt;br /&gt;Granting read access to the user instantly removed the issue :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-8867498423486791965?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/8867498423486791965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=8867498423486791965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8867498423486791965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8867498423486791965'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/05/spservices-error-with-getlistitems-call.html' title='SPServices Error With GetListItems Call'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6798805607744518528</id><published>2010-03-17T19:12:00.001-07:00</published><updated>2010-03-17T19:24:11.648-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>SharePoint Error for One User - The File Exists</title><content type='html'>Today had an interesting support issue to investigate. Of all the users on a SharePoint intranet, one person was unable to upload documents - each attempt to upload a document to a document library resulted in the "Access Denied" page. And the ULS log revealed little of value even in verbose mode.&lt;br /&gt;&lt;br /&gt;The other strange thing was that this user is configured as the site collection owner, and was able to create document libraries fine. But then could not add a document to the document library he had just created!&lt;br /&gt;&lt;br /&gt;Finally got some clues when I removed that account from the site owner SharePoint group (just in case that group was causing the behaviour). When I tried to add the account back to that group, an error page displayed with the useful(?) message "The file exists (Exception from HRESULT: 0x80070050)". At least that helped to confirm that the issue was in the user account.&lt;br /&gt;&lt;br /&gt;A bit of research revealed &lt;a href="http://vspug.com/farvashan/2008/10/20/how-to-fix-the-file-exists-exception-from-hresult-0x80070050-error/"&gt;this post&lt;/a&gt; on the subject - seems likely that the SID for the account has changed at some point. The described fix is to modify the SID in one of the SharePoint database tables. That's a bit of a worry, given that fiddling with the database content is like confusing a Kiwi accent for an Australian - to be avoided. But it may be the only approach available. Let me know if you try it out and it works for ya.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6798805607744518528?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6798805607744518528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6798805607744518528' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6798805607744518528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6798805607744518528'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/03/sharepoint-error-for-one-user-file.html' title='SharePoint Error for One User - The File Exists'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4592626171361022833</id><published>2010-03-02T12:22:00.000-08:00</published><updated>2010-03-02T12:37:23.826-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Roadblocks in the Install of Server 2008 R2 and SharePoint 2010 Beta</title><content type='html'>First up in my path to getting SharePoint 2010 running in a Hyper-V VM was the case of the missing roles in Windows Server 2008 R2, caused by a Windows update that failed to install.&lt;br /&gt;&lt;br /&gt;For some unpleasant reason, KB971468 had failed to install correctly, following the cancellation of the install of KB890830 (the windows update panel had stopped mid-install, and the progress bar just stayed where it was). The outcome of this was that no roles displayed in the Server Manager - instead just an error message.&lt;br /&gt;&lt;br /&gt;With the help of some worried searching, I came across &lt;a href="http://www.itsolutionskb.com/2009/04/roles-error-when-viewing-roles-in-windows-server-2008-server-manager/"&gt;this article&lt;/a&gt; by Glafkos Charalambous explaining the fix - use the System Update Readiness Tool from Microsoft to discover the faulty update files, then manually extract those files from the relevant update packages and copy them to the updates folder.&lt;br /&gt;&lt;br /&gt;Once I had replaced the bad MUM files (wonder if there are DAD files anywhere in the system, too??), then I couls rerun the other updates that were marked as failed in the Windows Update History.&lt;br /&gt;&lt;br /&gt;Hey, honey, I got my roles back!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4592626171361022833?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4592626171361022833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4592626171361022833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4592626171361022833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4592626171361022833'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2010/03/potholse-in-install-of-server-2008-r2.html' title='Roadblocks in the Install of Server 2008 R2 and SharePoint 2010 Beta'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-608629270645870381</id><published>2009-11-24T19:56:00.000-08:00</published><updated>2009-11-24T20:15:26.674-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='fix'/><title type='text'>SmallSearchInputBox Ignores Search Scope Settings</title><content type='html'>About the only nice thing about spending hours tracing a seemingly-incomprehensible issue is the satisfaction of cracking the bugger!&lt;br /&gt;&lt;br /&gt;I have just beaten a particularly annoying SharePoint problem, which with hindsight shouldn't have been too hard at all to trace. But only going through the steps that lead to discovering the cause was I able to reach the final "why didn't I think of that before?" realisation.&lt;br /&gt;&lt;br /&gt;The SmallSearchInputBox search box on a standard SharePoint site was ignoring the search scopes, and only ever displaying contextual scopes. These are the steps I followed:&lt;ol&gt;&lt;li&gt;Looked at all the enabled features at all scopes (farm, web application, site and web), but nothing unusual was visible there&lt;/li&gt;&lt;li&gt;Tried creating a new search box feature with lower sequence numbers than the normal "25" used by the enhanced search feature. Still no change. Tried activating this feature at all scopes, but still no effect&lt;/li&gt;&lt;li&gt;Created a new content placeholder in the master page, set the visibility to false for the existing content holder that holds the "SmallSearchInputBox" delegate control. Added a delegate control with a new ID to the new content placeholder, and tried activating a feature adding a search box to that new custom placeholder. The new search box always repeated the behaviour of the now-hidden one (i.e. still ignored the search scopes&lt;/li&gt;&lt;/ol&gt;Finally I wrote a small console application that lists the delegate controls that are activated at all scopes in the farm. There I found that some non-standard feature was adding the SmallSearchInputBox with the lowest sequence number. Here's a screenshot of the control delegates from my custom application (minus the offending instance, as I took this after the fix!):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_uULWazB2biQ/SwyufYV-2WI/AAAAAAAAAC0/R2I6BqGu3Yw/s1600/ControlDelegateLister+Screenshot.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 210px;" src="http://2.bp.blogspot.com/_uULWazB2biQ/SwyufYV-2WI/AAAAAAAAAC0/R2I6BqGu3Yw/s320/ControlDelegateLister+Screenshot.png" alt="" id="BLOGGER_PHOTO_ID_5407889106698951010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Phew, at last some headway. I could then do a text search in the Features folder of the 12 hive to find the XML file that set the sequence number for a SmallSearchInputBox control to "10". Found the feature, that happened to be configured as "hidden", uninstalled that feature, and at last the search is good again.&lt;br /&gt;&lt;br /&gt;Now time to relax!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-608629270645870381?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/608629270645870381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=608629270645870381' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/608629270645870381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/608629270645870381'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/11/smallsearchinputbox-ignores-search.html' title='SmallSearchInputBox Ignores Search Scope Settings'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_uULWazB2biQ/SwyufYV-2WI/AAAAAAAAAC0/R2I6BqGu3Yw/s72-c/ControlDelegateLister+Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2690282028185927297</id><published>2009-05-19T13:41:00.001-07:00</published><updated>2009-05-19T13:46:59.487-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>WSPBuilder Fails to Copy Assembly to GAC</title><content type='html'>Small tip I just found when having an issue using the WSPBuilder "Copy to GAC" option.&lt;br /&gt;&lt;br /&gt;For this one particular web part assembly, when selecting that WSPBuilder "Copy to GAC" option from the context menu in Visual Studio, the copy operation failed with the following message:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:courier new;"&gt;System.BadImageFormatException: The module was expected to contain an assembly manifest&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Examining the references in that Visual Studio project, I found that one reference for some reason had the "Copy Local" property set to True. By setting this to False (and thereby matching the settings for all the other references), the assembly successfully copies to the GAC using WSPBuilder&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2690282028185927297?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2690282028185927297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2690282028185927297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2690282028185927297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2690282028185927297'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/05/wspbuilder-fails-to-copy-assembly-to.html' title='WSPBuilder Fails to Copy Assembly to GAC'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2611467354477123221</id><published>2009-04-30T19:37:00.001-07:00</published><updated>2009-04-30T19:41:37.302-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><title type='text'>And I Quote, “Problem I Find With SharePoint…”</title><content type='html'>&lt;p&gt;Just been reading a newsgroup posting in which the author recommends to “&lt;em&gt;&lt;span style="font-family:Arial;"&gt;avoid SharePoint&lt;/span&gt;&lt;/em&gt;” as a CMS and to “&lt;em&gt;&lt;span style="font-family:Arial;"&gt;build your own so it can adapt and fit 100% into your business&lt;/span&gt;&lt;/em&gt;”.&lt;/p&gt;  &lt;p&gt;Why that suggestion? Judging from the rest of the post it seems to boil down to this - “&lt;em&gt;&lt;span style="font-family:Arial;"&gt;Problem I find with SharePoint is &lt;strong&gt;it allows everyone to become a publisher&lt;/strong&gt; and sites quickly get out of control with everything being dumped on it&lt;/span&gt;&lt;/em&gt;”.&lt;/p&gt;  &lt;p&gt;Could rephrase that sentiment as “problem I find with a hammer is that it allows everyone to knock in screws and so splits the timber”. SharePoint is but a tool. And as a tool, it needs policies and procedures in place to give guidance and control over its usage. &lt;/p&gt;  &lt;p&gt;SharePoint doesn’t allow everyone to be a publisher – the IT department who deploys it or the power users who configure it are the ones who can decide to allow everyone to become a publisher. &lt;/p&gt;  &lt;p&gt;It’s the same with any corporate software tool or platform; &lt;a href="http://governance.codeplex.com/"&gt;governance&lt;/a&gt; and planning are vital from the very start of the implementation cycle. As is gaining a thorough understanding of the tool.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2611467354477123221?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2611467354477123221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2611467354477123221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2611467354477123221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2611467354477123221'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/04/and-i-quote-problem-i-find-with.html' title='And I Quote, “Problem I Find With SharePoint…”'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-152560234411249878</id><published>2009-04-07T00:29:00.000-07:00</published><updated>2009-04-07T17:32:38.819-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='custom field'/><title type='text'>SharePoint Custom Field - jQuery Script in a List Form</title><content type='html'>&lt;div&gt;I have just released on &lt;a href="http://spjqueryfield.codeplex.com/"&gt;CodePlex&lt;/a&gt; the installable WSP solution files and the source code for this custom SharePoint field that enables jQuery to be added to list forms. It comes with two WSP files, one that deploys jQuery and one that does not (for farms that already have jQuery installed somewhere)&lt;br /&gt;&lt;br /&gt;Useful for making minor rendering changes to controls and text in the new item, edit item or display item forms in a SharePoint list. The field has a custom editor which accepts the script to render on selected forms. Here's a screenshot of the field editor &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_uULWazB2biQ/SdsGUdajrrI/AAAAAAAAACs/wdO5KHhe3aY/s1600-h/jQueryScriptFieldEditor.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5321854333231541938" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 234px" alt="" src="http://2.bp.blogspot.com/_uULWazB2biQ/SdsGUdajrrI/AAAAAAAAACs/wdO5KHhe3aY/s320/jQueryScriptFieldEditor.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;As an example of its usage, I needed to enlarge the select lists in a multi-value lookup field in a particular list. To achieve that, I added an instance of this new type of field to the list, and configured the field with the following JavaScript:&lt;/div&gt;&lt;br /&gt;&lt;div style='font-size:0.75em'&gt;&lt;br /&gt;&lt;div style='padding-left:20px;'&gt;var $multiselectLookup = $("td&gt;button:contains('Add &gt;')", $("table.ms-long")).parent('td');&lt;/div&gt;&lt;div style='padding-left:20px;'&gt;$multiselectLookup&lt;/div&gt;&lt;div style='padding-left:40px;'&gt;.siblings(':first') &lt;/div&gt;&lt;div style='padding-left:60px;'&gt;.children('div') &lt;/div&gt;&lt;div style='padding-left:60px;'&gt;.css('width','250px') &lt;/div&gt;&lt;div style='padding-left:80px;'&gt;.children('select')&lt;/div&gt;&lt;div style='padding-left:80px;'&gt;.css('width','300px');&lt;/div&gt;&lt;div style='padding-left:20px;'&gt;$multiselectLookup &lt;/div&gt;&lt;div style='padding-left:40px;'&gt;.siblings(':last') &lt;/div&gt;&lt;div style='padding-left:60px;'&gt;.children('div') &lt;/div&gt;&lt;div style='padding-left:60px;'&gt;.css('width','250px')&lt;/div&gt;&lt;div style='padding-left:80px;'&gt;.children('select') &lt;/div&gt;&lt;div style='padding-left:80px;'&gt;.css('width','300px');&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-152560234411249878?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/152560234411249878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=152560234411249878' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/152560234411249878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/152560234411249878'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/04/sharepoint-custom-field-jquery-script.html' title='SharePoint Custom Field - jQuery Script in a List Form'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_uULWazB2biQ/SdsGUdajrrI/AAAAAAAAACs/wdO5KHhe3aY/s72-c/jQueryScriptFieldEditor.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-8096899931665946233</id><published>2009-04-02T13:10:00.000-07:00</published><updated>2009-04-02T13:24:47.788-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>The "Open With Windows Explorer" Action Fails - Nothing Happens!</title><content type='html'>If the "Open with Windows Explorer" action on a list or document library in SharePoint (WSS or MOSS) fails to open a view of the folder in Windows Explorer, check that the WebClient service is running on the machine on which you are viewing the site.&lt;br /&gt;&lt;br /&gt;This occurred for me when attempting to view documents in a Windows Explorer view on a Server 2003 box - the Explorer view simply would not open even though the option was available. Temporarily enabling and starting th WebClient service (using the Services administrative tool) instantly cured the problem. I stopped the service on completion of the use of Explorer, as it may present a potential security vulnerability.&lt;br /&gt;&lt;br /&gt;The Webclient service not running also prevents you from adding a Network Drive mapping to SharePoint lists and libraries through the Add Network Place Wizard.&lt;br /&gt;&lt;br /&gt;Thanks to a &lt;a href="http://blogs.tamtam.nl/mart/SharepointExplorerViewProblems.aspx"&gt;posting&lt;/a&gt; from &lt;a href="http://blog.martmuller.nl/"&gt;Mart Muller&lt;/a&gt; for this fix.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-8096899931665946233?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/8096899931665946233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=8096899931665946233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8096899931665946233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8096899931665946233'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/04/open-with-windows-explorer-action-fails.html' title='The &quot;Open With Windows Explorer&quot; Action Fails - Nothing Happens!'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-562693988816490723</id><published>2009-03-26T12:15:00.000-07:00</published><updated>2009-03-26T12:51:19.888-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Missing Page Editing Toolbar? Breadcrumb Links Wrong?</title><content type='html'>If a SharePoint site is being accessed through a router or a proxy server, a missing Alternate Access Mapping (AAM) setting can cause all sorts of strange and seemingly unrelated issues. Here are a few symptoms that I experienced recently when viewing a SharePoint publishing site exposed through a router:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The Page Editing toolbar was missing on publishing pages. The toolbar did not display when the "Edit Page" option was selected on the site actions button&lt;/li&gt;&lt;li&gt;The "Show Page Editing Toolbar" option was greyed out (disabled) in the Site Actions menu&lt;/li&gt;&lt;li&gt;The links to the site home page in the breadcrumb trail and from the tab in the top navigation bar failed to open a page (page not found)&lt;/li&gt;&lt;/ul&gt;These were all caused by the fact that the URL used to request the pages through the router differed from the URL passed to the SharePoint server by the router. And that is the purpose of the Alternate Access Mappings. Adding the appropriate AAM values cured the problems, and also improved the rendering speed of pages in the site.&lt;br /&gt;&lt;br /&gt;For more on AAM, see the excellent series of articles named "What every SharePoint administrator needs to know about Alternate Access Mappings" on the &lt;a href="http://blogs.msdn.com/sharepoint/default.aspx"&gt;Microsoft SharePoint Team Blog&lt;/a&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2007/03/06/what-every-sharepoint-administrator-needs-to-know-about-alternate-access-mappings-part-1.aspx"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2007/04/18/what-every-sharepoint-administrator-needs-to-know-about-alternate-access-mappings-part-2-of-3.aspx"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2007/04/18/what-every-sharepoint-administrator-needs-to-know-about-alternate-access-mappings-part-3-of-3.aspx"&gt;Part 3&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-562693988816490723?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/562693988816490723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=562693988816490723' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/562693988816490723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/562693988816490723'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/03/missing-page-editing-toolbar-breadcrumb.html' title='Missing Page Editing Toolbar? Breadcrumb Links Wrong?'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7475402514093498754</id><published>2009-03-05T19:25:00.000-08:00</published><updated>2009-03-05T19:50:00.319-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><category scheme='http://www.blogger.com/atom/ns#' term='web service'/><category scheme='http://www.blogger.com/atom/ns#' term='web parts'/><category scheme='http://www.blogger.com/atom/ns#' term='data view'/><title type='text'>Building a Query Web Service Call Declaratively in a Data Source</title><content type='html'>Experimenting with ways of retrieving data from the search query web service for rendering in data view web parts.&lt;br /&gt;&lt;br /&gt;Couldn't seem to get any way of injecting search text inside a CONTAINS or FREETEXT predicate within the SQL search statement being sent to the query web service. Finally opted for a string construction technique - defining the start and the end of the SQL search statement in parameters in the datasource, and gluing these together around the search text term inside the selectcommand node. Surely their is a cleaner way than this - I must be missing something obvious here?&lt;br /&gt;&lt;style type="text/css"&gt;.cf { font-family: Courier New; font-size: 10pt; color: black; background: white; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: #a31515; }.cb3 { color: red; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="cf"&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;&lt;&lt;/span&gt;&lt;span class="cb2"&gt;DataSources&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;  &lt;&lt;/span&gt;&lt;span class="cb2"&gt;SharePoint:SoapDataSource&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;runat&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;server&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;SelectUrl&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;http://someserver/sites/DC/_vti_bin/search.asmx&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;SelectAction&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;http://microsoft.com/webservices/OfficeServer/QueryService/QueryEx&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;SelectPort&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;QueryServiceSoap&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;SelectServiceName&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;QueryService&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;AuthType&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;Windows&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;WsdlPath&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;http://ssc-moss:200/sites/test/_vti_bin/search.asmx?WSDL&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;XPath&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;""&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;ID&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;SoapDataSource2&lt;/span&gt;"&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;  &lt;&lt;/span&gt;&lt;span class="cb2"&gt;SelectCommand&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;    &lt;&lt;/span&gt;&lt;span class="cb2"&gt;soap:Envelope&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;xmlns:soap&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/span&gt;"&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;      &lt;&lt;/span&gt;&lt;span class="cb2"&gt;soap:Body&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;        &lt;&lt;/span&gt;&lt;span class="cb2"&gt;QueryEx&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;xmlns&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;http://microsoft.com/webservices/OfficeServer/QueryService&lt;/span&gt;"&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;          &lt;&lt;/span&gt;&lt;span class="cb2"&gt;queryXml&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;{queryXmlStart}"{QueryText}*"{queryXmlEnd}&lt;span class="cb1"&gt;&lt; / &lt;span class="cb2"&gt;queryXml&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;/&lt;span class="cb2"&gt;QueryEx&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;      /&lt;span class="cb2"&gt;soap:Body&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;   &lt; /&lt;span class="cb2"&gt;soap:Envelope&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;  &lt; /&lt;span class="cb2"&gt;SelectCommand&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;  &lt;&lt;/span&gt;&lt;span class="cb2"&gt;SelectParameters&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;    &lt;&lt;/span&gt;&lt;span class="cb2"&gt;WebPartPages:DataFormParameter&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;Name&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;queryXmlStart&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;ParameterKey&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;queryXmlStart&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;PropertyName&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;ParameterValues&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;DefaultValue&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;QueryPacket xmlns=&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="cb1"&gt;urn:Microsoft.Search.Query&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;Query&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;SupportedFormats&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;Format&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;urn:Microsoft.Search.Response.Document:Document&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/Format&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/SupportedFormats&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;  &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;Context&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;QueryText type=&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="cb1"&gt;MSSQLFT&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="cb1"&gt; language=&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="cb1"&gt;en-us&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;quot;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;select preferredname, firstname, lastname, workemail, workphone, homephone, Title, Path, OfficeNumber, ActiveAsText, jobtitle, pictureurl, description, write, rank, size from scope() where &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="cb1"&gt;scope&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span class="cb1"&gt;= 'People' and CONTAINS(DefaultProperties,'&lt;/span&gt;"&lt;span class="cb1"&gt;/&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;    &lt;&lt;/span&gt;&lt;span class="cb2"&gt;WebPartPages:DataFormParameter&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;Name&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;queryXmlEnd&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;ParameterKey&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;queryXmlEnd&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;PropertyName&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;ParameterValues&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;DefaultValue&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;') and firstname != '' order by preferredname asc&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/QueryText&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;  &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/Context&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;  &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;Range&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;StartAt&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;1&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/StartAt&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;Count&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;1000&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/Count&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/Range&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;  &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;EnableStemming&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;true&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/EnableStemming&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;TrimDuplicates&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;true&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/TrimDuplicates&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;IgnoreAllNoiseQuery&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;true&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/IgnoreAllNoiseQuery&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;ImplicitAndBehavior&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;true&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/ImplicitAndBehavior&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;IncludeRelevanceResults&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;true&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/IncludeRelevanceResults&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;IncludeSpecialTermResults&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;true&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/IncludeSpecialTermResults&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;   &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;IncludeHighConfidenceResults&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt;true&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/IncludeHighConfidenceResults&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/Query&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&amp;amp;lt;&lt;/span&gt;&lt;span class="cb1"&gt;/QueryPacket&lt;/span&gt;&lt;span class="cb3"&gt;&amp;amp;gt;&lt;/span&gt;"&lt;span class="cb1"&gt;/&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;    &lt;&lt;/span&gt;&lt;span class="cb2"&gt;WebPartPages:DataFormParameter&lt;/span&gt;&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;Name&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;QueryText&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;ParameterKey&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;QueryText&lt;/span&gt;"&lt;span class="cb1"&gt; &lt;/span&gt;&lt;span class="cb3"&gt;PropertyName&lt;/span&gt;&lt;span class="cb1"&gt;=&lt;/span&gt;"&lt;span class="cb1"&gt;ParameterValues&lt;/span&gt;"&lt;span class="cb1"&gt; /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;  &lt; /&lt;span class="cb2"&gt;SelectParameters&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;  &lt; /&lt;span class="cb2"&gt;SharePoint:SoapDataSource&lt;/span&gt;&lt;span class="cb1"&gt;&gt;&lt;/span&gt;&lt;span class="cb1"&gt;&lt;span class="cb1"&gt; &lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Note that the QueryText parameter is added as a Parameterbinding with location of "QueryString(qt)", meaning that the datasource will use any text in the querystring parameter named "qt" as the search text submitted to the query service.&lt;br /&gt;&lt;br /&gt;The drawback of this is that if no default value is defined for the QueryText parameter then this dataview will show an error when no qt querystring value is supplied.&lt;br /&gt;&lt;br /&gt;The benefit of this technique, however, is the ability to add quotes and wildcard search characters to the queryXML string in order to achieve the required search SQL&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7475402514093498754?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7475402514093498754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7475402514093498754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7475402514093498754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7475402514093498754'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/03/building-query-web-service-call.html' title='Building a Query Web Service Call Declaratively in a Data Source'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7268410386624248136</id><published>2009-02-15T11:03:00.000-08:00</published><updated>2009-02-15T11:22:54.230-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><title type='text'>Note Field Removes Script (and Inline Style) When Saving</title><content type='html'>I have been using a "Multiple lines of text" field (a note field) to store some HTML. Testing revealed that the HTML in the field was not quite the same as intended.&lt;br /&gt;&lt;br /&gt;Further investigation showed that when a list item with note fields is saved, any blocks of text that resemble script are removed from the rich text in the note fields. This occurs either when saving the item through a form in the browser, or when using the "update()" API method.&lt;br /&gt;&lt;br /&gt;The process that removes script sometimes gets too eager to "cleanse" the HTML - I found that it was removing the following inline style (not my HTML design, I hasten to add!):&lt;br /&gt;&lt;br /&gt;&lt;span style="MARGIN-LEFT: 10px;font-size:9;" &gt;BACKGROUND-IMAGE: url(http://some.site/info/communications/PublishingImages/box_1024.gif);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I didn't experiment further with this style to see whether adjusting the exact text (for example, adding quotes) might mean it was retained.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7268410386624248136?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7268410386624248136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7268410386624248136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7268410386624248136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7268410386624248136'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/02/note-field-removes-script-and-inline.html' title='Note Field Removes Script (and Inline Style) When Saving'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6305144227787356383</id><published>2009-02-12T11:01:00.000-08:00</published><updated>2009-02-12T11:32:18.851-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Unlearning My Development Process</title><content type='html'>Two years - that's about the length of time I have been developing on the SharePoint 2007 platform. Over that time I have been using roughly the same development process and tools, with a few additions to my "tool-belt", and a few tweaks to the steps in the process. But no radical shifts.&lt;br /&gt;&lt;br /&gt;Must admit I have always developed from the point of view of creating a deployable solution first, and adding functionality to that solution as I go along. Means that when the functionality is working and tested then I have a package ready to ship. Rather that than developing the packaging as a final task, and then needing to retest the deployment outcomes.&lt;br /&gt;&lt;br /&gt;And I like CONTROL over the solution, so I have been hand-crafting some of the solution files. You know the ones - the ones that WSPBuilder hides away. I did try that tool some time ago, but had problems with certain complexities in solutions, so returned to my old ways.&lt;br /&gt;&lt;br /&gt;Well, it's time to kick that habit and learn something new! So now that I am starting a major new project I am also trying out a new approach to my day-to-day SharePoint development. First change is to incorporate &lt;a href="http://www.codeplex.com/spvisualdev"&gt;SPVisualDev&lt;/a&gt; from the very start, and I must say I am really impressed with the ease it offers in adding fields, content types and lists to features. It even makes adding resource files nice n'easy, so encourages me to build the features ready for localisation if required in future (I know, I know, "&lt;a href="http://en.wikipedia.org/wiki/You_Ain"&gt;YAGNI&lt;/a&gt;", but given that the tool makes this capability easy I'm all for its inclusion).&lt;br /&gt;&lt;br /&gt;Then I am using &lt;a href="http://www.codeplex.com/wspbuilder"&gt;WSPBuilder&lt;/a&gt; to create the WSP files (though am disabling the "Cleanup" operation so I can still get to the manifest.xml and ddf files if necessary!).&lt;br /&gt;&lt;br /&gt;So far so good. Now all I need is a tool to generate a batch file with the appropriate stsadm commands for deploying a set of WSP files, and I'll be "sweet as, bro" (it's a &lt;a href="http://www.urbandictionary.com/define.php?term=sweet%20as"&gt;kiwi thing&lt;/a&gt;!)&lt;br /&gt;&lt;br /&gt;I'll let you know what else I change for the better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6305144227787356383?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6305144227787356383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6305144227787356383' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6305144227787356383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6305144227787356383'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/02/unlearning-my-development-process.html' title='Unlearning My Development Process'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2315570341973577594</id><published>2009-01-29T14:26:00.000-08:00</published><updated>2009-01-29T17:35:35.387-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><title type='text'>More SharePoint Rounded Corners</title><content type='html'>Late last year I posted an item on &lt;a href="http://sharethelearning.blogspot.com/2008/11/jquery-in-sharepoint-example-rounded.html"&gt;rounding the corners&lt;/a&gt; of the SharePoint quick launch menu using jQuery. Recently I have completed a project where rounded corners were required on outlined blocks of information rendered in a custom web part, so I thought I'd share with you another way of using the jCorner library.&lt;br /&gt;&lt;br /&gt;The requirement was for the web part to render a series of information blocks. The design I adopted was to drive the displayed information blocks from two lists:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Heading list - a custom list to define the heading and icon for each block&lt;/li&gt;&lt;li&gt;Links list - a custom list with a lookup field (pointing back to the heading list) and a URL field&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Each item in the heading list is rendered as a block in the custom web part, and each block contains a heading, an icon and a series of links (coming from the links list). An example of the styling of one of the blocks is shown below:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_uULWazB2biQ/SYIx181igaI/AAAAAAAAACk/HUFq9UPz4hI/s1600-h/BlockWithRoundedCorner.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5296850914674639266" style="WIDTH: 258px; CURSOR: hand; HEIGHT: 84px" alt="" src="http://2.bp.blogspot.com/_uULWazB2biQ/SYIx181igaI/AAAAAAAAACk/HUFq9UPz4hI/s320/BlockWithRoundedCorner.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The HTML markup that produces this box is as follows (not very semantic, unfortunately, and a few too many tags, but I needed it to get it to work within a deadline!) :&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt; &lt;span style="color:red;"&gt;class&lt;/span&gt;&lt;span style="color:blue;"&gt;='infoblocks'&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;  &lt;span style="color:blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt; &lt;span style="color:red;"&gt;class&lt;/span&gt;&lt;span style="color:blue;"&gt;='infoblocksinglecontainer'&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt; &lt;span style="color:red;"&gt;class&lt;/span&gt;&lt;span style="color:blue;"&gt;='infoblockouterforcorner'&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;      &lt;span style="color:blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt; &lt;span style="color:red;"&gt;class&lt;/span&gt;&lt;span style="color:blue;"&gt;='infoblock'&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt; &lt;span style="color:red;"&gt;class&lt;/span&gt;&lt;span style="color:blue;"&gt;='infoblockicon'&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;          &lt;span style="color:blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;img&lt;/span&gt; &lt;span style="color:red;"&gt;alt&lt;/span&gt;&lt;span style="color:blue;"&gt;='Insurance'&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;='http://.../Umbrella_Icon.jpg'&lt;/span&gt; &lt;span style="color:blue;"&gt;/&gt;&lt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;          &lt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt; &lt;span style="color:red;"&gt;class&lt;/span&gt;&lt;span style="color:blue;"&gt;='infoblocktitle'&gt;&lt;/span&gt;Insurance&lt;&lt;span style="color:blue;"&gt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;          &lt;span style="color:blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt; &lt;span style="color:red;"&gt;class&lt;/span&gt;&lt;span style="color:blue;"&gt;='infoblocklinks'&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;&lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;a&lt;/span&gt; &lt;span style="color:red;"&gt;class&lt;/span&gt;&lt;span style="color:blue;"&gt;='infoblocklink'&lt;/span&gt; &lt;span style="color:red;"&gt;href&lt;/span&gt;&lt;span style="color:blue;"&gt;='http://...'&lt;/span&gt; &lt;span style="color:red;"&gt;title&lt;/span&gt;&lt;span style="color:blue;"&gt;='Get quotes'&gt;&lt;/span&gt;Get quotes&lt;span style="color:blue;"&gt;&lt; /&lt;span style="color:#a31515;"&gt;a&lt;/span&gt;&lt;span style="color:blue;"&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;          &lt;&lt;span style="color:blue;"&gt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;      &lt;&lt;span style="color:blue;"&gt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;&lt;span style="color:blue;"&gt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;  &lt;&lt;span style="color:blue;"&gt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&gt;&lt;/span&gt;&lt;br /&gt;&lt;&lt;span style="color:blue;"&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt; &lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;div&gt;The custom web part retrieves the list items from the headings list, and outputs a "&lt;span style="font-family:Courier New;color:blue;"&gt;infoblocksinglecontainer&lt;/span&gt;" DIV element for each list item, populating the various contained DIVs with the data from the list item.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The round corners are then formed with a combination of CSS and JavaScript calling methods in the jQuery.corner library. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;The JavaScript is contained in a JS file deployed to the LAYOUTS folder in the 12 hive and then referenced by a SCRIPT tag output by the web part used on the page. One point to notice about the jQuery selector is the use of a locally-scoped context to improve performance. I picked up this tip from the great article entitled "&lt;a href="http://www.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips.aspx"&gt;Improve your jQuery - 25 Excellent Tips&lt;/a&gt;" by Jon Hobbs-Smith - if you use jQuery then I thoroughly recommend you have a read of that one! &lt;/div&gt;&lt;br /&gt;&lt;div style="BACKGROUND: white" color="black" face="Courier New" size="10pt"&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" face="Courier New" size="10pt"&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" face="Courier New" size="10pt"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;$(document).ready(&lt;span style="color:blue;"&gt;function&lt;/span&gt;() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  AddRoundCorners();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;});&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; AddRoundCorners() {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  &lt;span style="color:blue;"&gt;var&lt;/span&gt; blocksContext = $(&lt;span style="color:#a31515;"&gt;'.ms-WPBody'&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  $(&lt;span style="color:#a31515;"&gt;'.infoblockouterforcorner'&lt;/span&gt;, blocksContext).corner(&lt;span style="color:#a31515;"&gt;'9px'&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  $(&lt;span style="color:#a31515;"&gt;'.infoblock'&lt;/span&gt;, blocksContext).corner(&lt;span style="color:#a31515;"&gt;'7px'&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;The CSS is as follows:&lt;br /&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblocks&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;width&lt;/span&gt;:&lt;span style="color:blue;"&gt;250px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblocks-twocolumns&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;width&lt;/span&gt;:&lt;span style="color:blue;"&gt;520px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblocksinglecontainer&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;float&lt;/span&gt;:&lt;span style="color:blue;"&gt;left&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;display&lt;/span&gt;:&lt;span style="color:blue;"&gt;inline&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;height&lt;/span&gt;:&lt;span style="color:blue;"&gt;1px&lt;/span&gt;; &lt;span style="color:green;"&gt;/* Switches on layout for this element, thereby forcing the element to contain the image */&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;margin&lt;/span&gt;:&lt;span style="color:blue;"&gt;5px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;width&lt;/span&gt;:&lt;span style="color:blue;"&gt;1px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblockouterforcorner&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;background-color&lt;/span&gt;:&lt;span style="color:blue;"&gt;#b9d5f1&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;display&lt;/span&gt;:&lt;span style="color:blue;"&gt;inline&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;height&lt;/span&gt;:&lt;span style="color:blue;"&gt;1px&lt;/span&gt;; &lt;span style="color:green;"&gt;/* Switches on layout for this element, thereby forcing the element to contain the image */&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;padding&lt;/span&gt;:&lt;span style="color:blue;"&gt;1px&lt;/span&gt; &lt;span style="color:blue;"&gt;2px&lt;/span&gt; &lt;span style="color:blue;"&gt;1px&lt;/span&gt; &lt;span style="color:blue;"&gt;2px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblock&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;background-color&lt;/span&gt;:&lt;span style="color:blue;"&gt;white&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;border&lt;/span&gt;:&lt;span style="color:blue;"&gt;solid&lt;/span&gt; &lt;span style="color:blue;"&gt;1px&lt;/span&gt; &lt;span style="color:blue;"&gt;#000&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;display&lt;/span&gt;:&lt;span style="color:blue;"&gt;inline&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;height&lt;/span&gt;:&lt;span style="color:blue;"&gt;1px&lt;/span&gt;; &lt;span style="color:green;"&gt;/* Switches on layout for this element, thereby forcing the element to contain the image */&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;margin&lt;/span&gt;:&lt;span style="color:blue;"&gt;2px&lt;/span&gt; &lt;span style="color:blue;"&gt;-2px&lt;/span&gt; &lt;span style="color:blue;"&gt;2px&lt;/span&gt; &lt;span style="color:blue;"&gt;2px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;padding&lt;/span&gt;:&lt;span style="color:blue;"&gt;2px&lt;/span&gt; &lt;span style="color:blue;"&gt;2px&lt;/span&gt; &lt;span style="color:blue;"&gt;2px&lt;/span&gt; &lt;span style="color:blue;"&gt;2px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;width&lt;/span&gt;:&lt;span style="color:blue;"&gt;245px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblocktitle&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;height&lt;/span&gt;:&lt;span style="color:blue;"&gt;1px&lt;/span&gt;; &lt;span style="color:green;"&gt;/* Switches on layout for this element, thereby forcing the element to contain the image */&lt;/span&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;color&lt;/span&gt;:&lt;span style="color:blue;"&gt;#06c&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;font-size&lt;/span&gt;:&lt;span style="color:blue;"&gt;10pt&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;font-weight&lt;/span&gt;:&lt;span style="color:blue;"&gt;bold&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;padding-top&lt;/span&gt;:&lt;span style="color:blue;"&gt;3px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;margin&lt;/span&gt;:&lt;span style="color:blue;"&gt;0&lt;/span&gt; &lt;span style="color:blue;"&gt;0&lt;/span&gt; &lt;span style="color:blue;"&gt;0&lt;/span&gt; &lt;span style="color:blue;"&gt;70px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblockicon&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;display&lt;/span&gt;:&lt;span style="color:blue;"&gt;inline&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;float&lt;/span&gt;:&lt;span style="color:blue;"&gt;left&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;width&lt;/span&gt;:&lt;span style="color:blue;"&gt;65px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;height&lt;/span&gt;:&lt;span style="color:blue;"&gt;100%&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblockicon&lt;/span&gt; &lt;span style="color:#a31515;"&gt;img&lt;/span&gt;{&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;vertical-align&lt;/span&gt;:&lt;span style="color:blue;"&gt;middle&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblocklinks&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;margin&lt;/span&gt;:&lt;span style="color:blue;"&gt;3px&lt;/span&gt; &lt;span style="color:blue;"&gt;5px&lt;/span&gt; &lt;span style="color:blue;"&gt;3px&lt;/span&gt; &lt;span style="color:blue;"&gt;70px&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:red;"&gt;display&lt;/span&gt;:&lt;span style="color:blue;"&gt;block&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:#a31515;"&gt;.infoblocklinks&lt;/span&gt; &lt;span style="color:#a31515;"&gt;a:link&lt;/span&gt;,&lt;span style="color:#a31515;"&gt;.infoblocklinks&lt;/span&gt; &lt;span style="color:#a31515;"&gt;a:visited&lt;/span&gt;{&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  &lt;span style="color:red;"&gt;font-size&lt;/span&gt;:&lt;span style="color:blue;"&gt;8pt&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  &lt;span style="color:red;"&gt;font-weight&lt;/span&gt;:&lt;span style="color:blue;"&gt;normal&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Note that this CSS assumes that the icon in a block will be 60x60 in size. The CSS handles any number of infoblocklink elements correctly by allowing the block to grow in depth (not width). And to finish, here's another useful behaviour of these blocks; by setting the width of the "infoblocks" class to 520px you can have two columns of blocks rather than one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2315570341973577594?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2315570341973577594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2315570341973577594' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2315570341973577594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2315570341973577594'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/01/more-sharepoint-rounded-corners.html' title='More SharePoint Rounded Corners'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_uULWazB2biQ/SYIx181igaI/AAAAAAAAACk/HUFq9UPz4hI/s72-c/BlockWithRoundedCorner.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-3973580782201634241</id><published>2009-01-14T18:14:00.001-08:00</published><updated>2009-01-14T18:27:15.155-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Missing Buttons and Link on the Add Web Part Page</title><content type='html'>Beware when tweaking page widths in SharePoint! I was attempting to set the page width to a set size by applying a width style to the ms-main CSS class in a SharePoint site. Easy-peasy, job done.&lt;br /&gt;&lt;br /&gt;But wait! When I went to add a web part to a page in this site by clicking on the "Add a Web Part" link at the top of a web part zone, the resulting popup page had no buttons!&lt;br /&gt;&lt;br /&gt;First task - look at the source of that page. But which page creates that popup? By running Fiddler and clicking on a link to open that popup, the capture in Fiddler showed the page name to be "webpartgallerypickerpage.aspx" in the LAYOUTS folder in the 12 hive.&lt;br /&gt;&lt;br /&gt;Even better it meant I could open that page in Firefox by pasting in the complete URL as recorded by Fiddler. Which in turn meant I could use Firebug to spot from where the classes in the page are sourced.&lt;br /&gt;&lt;br /&gt;It turns out that this popup page uses the site master page and stylesheet, causing the main table in the popup window to be set to my fixed width - a width greater that the set width of the popup window. The popup is configured to show no scroll bars - hence the disappearing content!&lt;br /&gt;&lt;br /&gt;Luckily the content table in the "webpartgallerypickerpage.aspx" has an ID of "mainTable" which is not applied to the table in other SharePoint pages. Therfore I could apply a special width in CSS to the table appearing in this popup.&lt;br /&gt;&lt;br /&gt;Problem solved for that page, now I'd better check whether that table ID is used elsewhere...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-3973580782201634241?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/3973580782201634241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=3973580782201634241' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3973580782201634241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3973580782201634241'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2009/01/missing-buttons-and-link-on-add-web.html' title='Missing Buttons and Link on the Add Web Part Page'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6734064695329959771</id><published>2008-11-26T11:24:00.000-08:00</published><updated>2008-11-26T12:52:59.617-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='custom field'/><title type='text'>jQuery in a SharePoint Custom Field</title><content type='html'>One way of gaining new SharePoint functionality without "disturbing" the structure or content of lists and document libraries is to create custom fields that use jQuery to perform client-side processing.&lt;br /&gt;&lt;br /&gt;AJAX calls to the built-in web services are simple once the SOAP message structure has been determined. The data returned by the call can then be made to interact with and modify controls on the page using the powerful selector mechanism in jQuery.&lt;br /&gt;&lt;br /&gt;In this post I'll cover a few tips I learnt whilst creating one such custom field.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The Ajax Call&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In a &lt;a href="http://sharethelearning.blogspot.com/2008/11/using-jquery-for-ajax-user-profile.html"&gt;previous post&lt;/a&gt; I covered the structure of a jQuery AJAX call to a SharePoint web service. But how to derive the actual SOAP body for that call? One way I found to do this which removed lots of the guess work was as follows:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create a simple console application in Visual Studio and add a reference to the web service you want to call&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Write code in that console application to call the required method on that web service. Begin by using the simplest set of parameters in the call and making sure they return data as expected before adding additional parameters. For example, in my calls to the Lists web service (lists.asmx) my first tests used empty elements for the query, viewfields and queryoptions arguments in the GetListItems() call&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Start up &lt;a href="http://www.fiddler2.com/fiddler2/"&gt;Fiddler&lt;/a&gt; (or your favourite HTTP traffic logging tool). Ensure that the "Capture Traffic" option is ticked in the file menu.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Run your console application, which will make the web service call.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In Fiddler, view the HTTP call that was made by the console app by clicking on that listed call - it will be to the URL you set in the console app, and will have a result of '200'. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;If the right-hand pane of Fiddler is showing the &lt;em&gt;&lt;strong&gt;Statistics&lt;/strong&gt;&lt;/em&gt; tab, click on the &lt;strong&gt;&lt;em&gt;Inspectors&lt;/em&gt;&lt;/strong&gt; tab - this displays the outgoing message from your console app in the top half, and the return message in the bottom half. Open the &lt;em&gt;&lt;strong&gt;Raw&lt;/strong&gt;&lt;/em&gt; tab within each half of the right-hand pane, and you will see the soap envelope that was sent in the web service call in the top pane. That is the XML to be used in the data parameter of the jQuery AJAX call. &lt;/p&gt;&lt;p&gt;One other item to note from the Raw content of the outgoing HTTP call is the SOAPAction, as that value needs to be used to set the soapaction in the beforesend anonymous function in the jQuery AJAX call.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_uULWazB2biQ/SS2q6ms3lQI/AAAAAAAAACM/s-E64fnTq44/s1600-h/FiddlerForAJAXAnalysis.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5273058662518592770" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 219px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_uULWazB2biQ/SS2q6ms3lQI/AAAAAAAAACM/s-E64fnTq44/s320/FiddlerForAJAXAnalysis.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Communicating from SharePoint to jQuery&lt;/strong&gt;&lt;br /&gt;One important point I have not yet covered was the fact that it is possible for a custom field to render in a SharePoint form, and yet to have no displayed elements. This is one way to use jQuery to modify controls and data in the form. My custom field outputs only script tags plus an empty span. It is still necessary to hide the table row in the form that contains this custom field, as the standard SharePoint rendering of a field in the new/edit list item form shows the field title in the left column and the field content in the right.&lt;/p&gt;&lt;p&gt;Hiding of the row is achieved by giving the empty span a class (for example 'hiddenfield'), and then rendering in the custom field some jQuery script that hides table rows that contain spans with the 'hiddenfield' class.&lt;/p&gt;&lt;p&gt;For the custom field to interact with data in other fields using jQuery, data needs to be passed from the server side into the client-side script in the custom field. AJAX web service calls can be used for this once the form has rendered, but what if you want your client-side script to have knowledge about the particular controls it is required to modify?&lt;/p&gt;&lt;p&gt;The first step is to ensure that the page on which the custom field will be rendered references the jQuery library. My approach is to add script elements to the &lt;span style="font-family:courier new;color:#660000;"&gt;RenderingTemplate&lt;/span&gt; in the custom field ASCX user control (which is deployed to the CONTROLTEMPLATES 12 hive folder), and to deploy the jQuery library to the LAYOUTS 12 hive folder.&lt;/p&gt;&lt;p&gt;Then, to enable the code in the custom field to set parameters in the client-side script (for example, to set the name of another field in the new/edit form that the script is to interact with), I added in the &lt;span style="font-family:courier new;color:#660000;"&gt;RenderingTemplate&lt;/span&gt; another script tag that contains an &lt;span style="font-family:courier new;color:#660000;"&gt;asp:Literal&lt;/span&gt; server control. Custom field code in the &lt;span style="font-family:courier new;color:#339999;"&gt;BaseFieldControl&lt;/span&gt; subclass can then output script into this literal control.&lt;/p&gt;&lt;p&gt;I created a custom field editor which derives the information to be rendered into that Literal control, and save this information in a custom property of my custom field. The technique for storing custom properties is explained well by &lt;a href="http://sharepointex.blogspot.com/"&gt;Anton Myslevich&lt;/a&gt; in &lt;a href="http://www.windows-tech.info/6/fa4c9cbcadcdd8fb.php"&gt;this forum thread&lt;/a&gt; (thanks, Anton!), particularly the difficulty in saving properties for a new instance of a custom field.&lt;/p&gt;&lt;p&gt;To summarise, the SharePoint list administrator adds a new field of type "MyCustomjQueryField" to a list and applies some custom configuration settings in the "Create New Field" form. These settings are processed and stored as custom properties of the custom field instance. When a list item is create or edited by a list user, the new or edit form is displayed, and the custom field uses its saved custom properties to render JavaScript in a hidden table row in that form. The JavaScript then uses the power of jQuery to interact with other fields in that form.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Displaying a Message During the AJAX Call &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One small use of jQuery was to show a message in the new/edit form whilst a web service call initiated by the custom field was occuring. This is important given the asynchronous nature of the call and the fact that it is possible for the call to take a noticeable time to complete. &lt;/p&gt;&lt;p&gt;This was achieved using the 'after()' jQuery manipulation method to add a span directly after the HTML element in the form that was being modified by the web service call. Before the jQuery AJAX call is made, I add this span, and then remove the span in the event handlers for the error and success events triggered on completion of the AJAX call. &lt;/p&gt;&lt;p&gt;One small but pleasing touch was to fade out the message using the 'fadeOut()' jQuery method. Unnecessary perhaps, but less jarring to the eye than the text just disappearing instantly.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6734064695329959771?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6734064695329959771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6734064695329959771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6734064695329959771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6734064695329959771'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/11/jquery-in-sharepoint-custom-field.html' title='jQuery in a SharePoint Custom Field'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_uULWazB2biQ/SS2q6ms3lQI/AAAAAAAAACM/s-E64fnTq44/s72-c/FiddlerForAJAXAnalysis.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7466684142472939422</id><published>2008-11-19T19:02:00.000-08:00</published><updated>2008-11-19T19:38:02.865-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>Silverlight in a Content Editor Web Part</title><content type='html'>First trial with Silverlight - getting Scott Gu's &lt;a href="http://weblogs.asp.net/scottgu/pages/silverlight-2-end-to-end-tutorial-building-a-digg-search-client.aspx"&gt;Silverlight DIGG client&lt;/a&gt; running in a SharePoint web part page with the simplest possible implementation.&lt;br /&gt;&lt;br /&gt;The steps:&lt;ol&gt;&lt;li&gt;Created a web part page document library&lt;/li&gt;&lt;li&gt;Uploaded DiggSample.xap into the library&lt;/li&gt;&lt;li&gt;Create a new web part page in the library&lt;/li&gt;&lt;li&gt;Added a content editor web part to the page.&lt;/li&gt;&lt;li&gt;Added an object tag pointing to the XAP file in the source code of the content editor web part&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;And, voila.... nothing displayed! Played with adding the Silverlight.js file to the library, and various other techniques. Finally found the key was the interaction of the object tag width and height with the rendered dimensions of the web part.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Solved by either:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Setting a fixed height and width in the web part appearance properties, and giving the object tag a height and width of 100%, &lt;strong&gt;OR&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Setting an absolute height and width for the object tag and leaving the web part with non-fixed height and width&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;The former approaches works better as the latter approaches results in the Silverlight element's UI not matching the web part's width.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The content of the object tag is as shown below:&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_uULWazB2biQ/SSTa8ZchW2I/AAAAAAAAACE/Dq-3tsad9R8/s1600-h/SilverlightObject.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5270578195087842146" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 81px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_uULWazB2biQ/SSTa8ZchW2I/AAAAAAAAACE/Dq-3tsad9R8/s320/SilverlightObject.png" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7466684142472939422?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7466684142472939422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7466684142472939422' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7466684142472939422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7466684142472939422'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/11/silverlight-in-content-editor-web-part.html' title='Silverlight in a Content Editor Web Part'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_uULWazB2biQ/SSTa8ZchW2I/AAAAAAAAACE/Dq-3tsad9R8/s72-c/SilverlightObject.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6748217069611900337</id><published>2008-11-19T16:49:00.000-08:00</published><updated>2008-11-19T17:36:40.435-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='web parts'/><title type='text'>Using jQuery for AJAX User Profile Queries in SharePoint</title><content type='html'>Continuing on my vein of experimenting with customisation of SharePoint using jQuery, I wanted to see if I could use the AJAX methods in jQuery to call SharePoint web services. And it just so happens a suitable requirement arose - the need to use details from the profile for the current logged-in user of a web part page.&lt;br /&gt;&lt;br /&gt;A data view web part was required to display staff located in the same office as the current logged-in user of the web part page. The office name for each staff member was being stored in the user profiles.&lt;br /&gt;&lt;br /&gt;Of course this functionality could have been developed in a custom web part, but I am growing to like the rapidity of creating business functionality with data view web parts. Combined with jQuery, they offer a suprising amount of flexibility.&lt;br /&gt;&lt;br /&gt;In SharePoint designer I created a data source pointing at the user profiles. Then I created a data form web part using this data source to display a table of information on each user profile. Also included in the web part was a hidden text field that contained the login name of the current user. The purpose of this hidden value was to provide the search text for the AJAX call to the profile web service, so that I could retrieve the details for the current user.&lt;br /&gt;&lt;br /&gt;I needed the help of &lt;a href="http://www.fiddler2.com/fiddler2/"&gt;Fiddler&lt;/a&gt; and the &lt;a href="http://www.codeplex.com/SharePointSearchServ"&gt;SharePoint Search Service Tool&lt;/a&gt; to help craft the necessary QueryPacket XML. Once I had the working XML, I placed it in a JavaScript file referenced within the data form web part.&lt;br /&gt;&lt;br /&gt;The jQuery went something like this:&lt;br /&gt;&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;$(document).ready(&lt;span style="color:blue;"&gt;function&lt;/span&gt;() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    startAjaxOfficeSearch();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;});&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; startAjaxOfficeSearch() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;var&lt;/span&gt; userlogin = $(&lt;span style="color:#a31515;"&gt;"#CurrentUserLogin"&lt;/span&gt;).text();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;if&lt;/span&gt; (userlogin != &lt;span style="color:#a31515;"&gt;''&lt;/span&gt;) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;      &lt;span style="color:blue;"&gt;var&lt;/span&gt; queryXml = &lt;span style="color:#a31515;"&gt;'&lt;querypacket xmlns="urn:Microsoft.Search.Query"&gt;&lt;query domain="QDomain"&gt;&lt;supportedformats&gt;&lt;format&gt;urn:Microsoft.Search.Response.Document:Document&lt;/format&gt;&lt;/supportedformats&gt;&lt;context&gt;&lt;querytext language="en-us" type="MSSQLFT"&gt;select accountname, preferredname, firstname, lastname, workemail, workphone, Title, Path, pictureurl, description, write, rank, size, OfficeNumber from scope() where "scope"= \'People\' and accountname = \''&lt;/span&gt; + userlogin + &lt;span style="color:#a31515;"&gt;'\' order by preferredname asc&lt;/querytext&gt;&lt;/context&gt;'&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;      &lt;span style="color:blue;"&gt;var&lt;/span&gt; queryXmlOptions = &lt;span style="color:#a31515;"&gt;'&lt;range&gt;&lt;startat&gt;1&lt;/startat&gt;&lt;count&gt;10&lt;/count&gt;&lt;/range&gt;&lt;enablestemming&gt;true&lt;/enablestemming&gt;&lt;trimduplicates&gt;true&lt;/trimduplicates&gt;&lt;ignoreallnoisequery&gt;true&lt;/ignoreallnoisequery&gt;&lt;implicitandbehavior&gt;true&lt;/implicitandbehavior&gt;&lt;includerelevanceresults&gt;true&lt;/includerelevanceresults&gt;&lt;includespecialtermresults&gt;true&lt;/includespecialtermresults&gt;&lt;includehighconfidenceresults&gt;true&lt;/includehighconfidenceresults&gt;&lt;/query&gt;&lt;/querypacket&gt;'&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;      &lt;span style="color:blue;"&gt;var&lt;/span&gt; completeQueryXml = queryXml + queryXmlOptions;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;      &lt;span style="color:blue;"&gt;var&lt;/span&gt; regex = &lt;span style="color:blue;"&gt;new&lt;/span&gt; RegExp(String.fromCharCode(60), &lt;span style="color:#a31515;"&gt;'g'&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;      queryXml = completeQueryXml.replace(/&amp;lt;/G, &lt;span color="#a31515"&gt;'&amp;amp;lt;'&lt;/span&gt;).replace(/&amp;gt;/g, &lt;span style="color:#a31515;"&gt;'&amp;amp;gt;'&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;      &lt;span style="color:blue;"&gt;var&lt;/span&gt; soapMessage = String.fromCharCode(60) + &lt;span style="color:#a31515;"&gt;'?xml version="1.0" encoding="utf-8"?&gt;&lt;?xml:namespace prefix = soap /&gt;&lt;soap:envelope xmlns="http://microsoft.com/webservices/OfficeServer/QueryService" soap="http://schemas.xmlsoap.org/soap/envelope/" xsi="http://www.w3.org/2001/XMLSchema-instance" xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;queryxml&gt;'&lt;/span&gt; + queryXml + &lt;span style="color:#a31515;"&gt;'&lt;/queryxml&gt;&lt;/queryex&gt;&lt;/soap:envelope&gt;'&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;      $.ajax({ type: &lt;span style="color:#a31515;"&gt;"POST"&lt;/span&gt;,&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            url: &lt;span style="color:#a31515;"&gt;"/_vti_bin/search.asmx"&lt;/span&gt;,&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            contentType: &lt;span style="color:#a31515;"&gt;"text/xml"&lt;/span&gt;,&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            dataType: &lt;span style="color:#a31515;"&gt;"xml"&lt;/span&gt;,&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            data: soapMessage,&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            processData: &lt;span style="color:blue;"&gt;false&lt;/span&gt;,&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            beforeSend: &lt;span style="color:blue;"&gt;function&lt;/span&gt;(req) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;              req.setRequestHeader(&lt;span style="color:#a31515;"&gt;"X-Vermeer-Content-Type"&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;"text/xml; charset=utf-8"&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;              req.setRequestHeader(&lt;span style="color:#a31515;"&gt;"soapaction"&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&lt;a href="http://microsoft.com/webservices/OfficeServer/QueryService/QueryEx"&gt;http://microsoft.com/webservices/OfficeServer/QueryService/QueryEx&lt;/a&gt;&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            },&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            error: &lt;span style="color:blue;"&gt;function&lt;/span&gt;(XMLHttpRequest, textStatus, errorThrown) { ajaxError(XMLHttpRequest,textStatus, errorThrown); },&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;            success: &lt;span style="color:blue;"&gt;function&lt;/span&gt;(xml) { ajaxFinish(xml); }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;      });&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; ajaxFinish(xml) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  $(&lt;span style="color:#a31515;"&gt;"RelevantResults"&lt;/span&gt;, xml).each(&lt;span style="color:blue;"&gt;function&lt;/span&gt;() {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;var&lt;/span&gt; selectedOfficeValue = $(&lt;span style="color:#a31515;"&gt;"OFFICENUMBER"&lt;/span&gt;, &lt;span style="color:blue;"&gt;this&lt;/span&gt;).text();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:green;"&gt;//Do other stuff with this office value&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;  });&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}   &lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; ajaxError(xmlObj,textStatus,errorThrown)   {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    alert(&lt;span style="color:#a31515;"&gt;"(Ajax error: "&lt;/span&gt;+textStatus+&lt;span style="color:#a31515;"&gt;")"&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    alert(xmlObj.statusText);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;The login of the current user is contained in the hidden text box with ID of '&lt;em&gt;CurrentUserLogin&lt;/em&gt;', as created by the data form web part. The derived query seeks exact matches for that user login against the &lt;em&gt;accountname&lt;/em&gt; property in the user profile records - you may find this needs to query against the &lt;em&gt;preferredname&lt;/em&gt; property instead of &lt;em&gt;accountname&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;The &lt;em&gt;ajaxfinish&lt;/em&gt; method gets all the XML returned from the web service call, and uses jQuery parsing to extract the office name from the returned profile.&lt;br /&gt;&lt;br /&gt;Note that the url parameter in the ajax call really needs to be replaced by a variable that adjusts to the actual site collection root, and that the ajaxerror function is not production ready!&lt;br /&gt;&lt;br /&gt;I've missed out a lot of detail in this post (for instance, how to create a data source in SharePoint designer that points at the user profile store), but hopefully have given a taster of another use for jQuery, and another way of approaching SharePoint customisations.&lt;br /&gt;&lt;br /&gt;One other tip - to find out the property names to use in the query, go to the Shared Services Administration page for your farm, open the search settings page, and then open the Metadata property mappings page. That is where you will discover those strange names (such as OFFICENUMBER)!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_uULWazB2biQ/SSS9Ojpu4mI/AAAAAAAAAB8/BukMguEuiMg/s1600-h/Profiles.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5270545521716421218" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_uULWazB2biQ/SSS9Ojpu4mI/AAAAAAAAAB8/BukMguEuiMg/s320/Profiles.png" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6748217069611900337?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6748217069611900337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6748217069611900337' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6748217069611900337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6748217069611900337'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/11/using-jquery-for-ajax-user-profile.html' title='Using jQuery for AJAX User Profile Queries in SharePoint'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_uULWazB2biQ/SSS9Ojpu4mI/AAAAAAAAAB8/BukMguEuiMg/s72-c/Profiles.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-5306181013934780456</id><published>2008-11-12T16:59:00.001-08:00</published><updated>2008-11-12T17:52:19.873-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><title type='text'>jQuery in SharePoint Example - Rounded Corners</title><content type='html'>A recent project involved the branding of MOSS to incorporate custom design elements as supplied in a PhotoShop page mockup. One of these design requirements was rounding the external corners of the quick launch menu.&lt;br /&gt;&lt;br /&gt;Hmmm, what to do. There are &lt;a href="http://www.cssjuice.com/25-rounded-corners-techniques-with-css/"&gt;plenty of techniques&lt;/a&gt; discussed on the web for achieving this outcome, but often the basis for these techniques is to start with clean, web-standards compliant HTML. That's certainly not what SharePoint provides - I needed to work with the HTML that is created by the mixture of master pages and user controls, and did not want to override standard elements for this styling exercise. One aim was to minimize the changes, if any, to the master page.&lt;br /&gt;&lt;br /&gt;Many of the rounded corner approaches use JavaScript. And I was, at the time of this project, starting to see the potential of jQuery combined with SharePoint. So a little more research located a neat way forward - the &lt;a href="http://www.methvin.com/jquery/jq-corner-demo.html"&gt;jQuery.Round&lt;/a&gt; plug-in.&lt;br /&gt;&lt;br /&gt;After a few &lt;span style="font-decoration: line-through"&gt;minutes&lt;/span&gt; (hours?) experimentation I derived the jQuery statements to apply rounded corners to the menu. This of course also required adding references to the jQuery and jQuery.round libraries in the master page - so it was necessary after all to change that page!&lt;br /&gt;&lt;br /&gt;The statements were:&lt;br /&gt;&lt;br /&gt;&lt;div style="BACKGROUND: white;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; AddQuickLaunchCorners()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    $(&lt;span style="color:#a31515;"&gt;".ms-quicklaunchouter"&lt;/span&gt;).corner(&lt;span style="color:#a31515;"&gt;"10px"&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    $(&lt;span style="color:#a31515;"&gt;"div.ms-quickLaunch h3.ms-standardheader span div.ms-quicklaunchheader"&lt;/span&gt;).css(&lt;span style="color:#a31515;"&gt;"background-color"&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;"#c1ecff"&lt;/span&gt;).corner(&lt;span style="color:#a31515;"&gt;"top 7px"&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    $(&lt;span style="color:#a31515;"&gt;"table.ms-recyclebin:last td"&lt;/span&gt;).corner(&lt;span style="color:#a31515;"&gt;"bottom 7px"&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Note the assumption in the last JavaScript statement that the recycle bin will be the bottom row in the quick launch menu.&lt;br /&gt;&lt;br /&gt;These statements, together with modifications to some of the other CSS styles, resulted in the following look for the quick launch menu:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_uULWazB2biQ/SRuD-Lo3UoI/AAAAAAAAABs/iJyVSvz_WJg/s1600-h/RoundedCorners.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5267949293439242882" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 181px; CURSOR: hand; HEIGHT: 250px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_uULWazB2biQ/SRuD-Lo3UoI/AAAAAAAAABs/iJyVSvz_WJg/s320/RoundedCorners.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;But then I came across a very annoying behaviour. Imagine the following scenario:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I view a page containing this menu in one tab in IE7&lt;/li&gt;&lt;li&gt;Then I open another tab in IE7 and navigate around any page in that second tab &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Not an unusual behaviour really. But on returning to the first tab displaying the SharePoint page with menu, this is what the menu then looked like:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://3.bp.blogspot.com/_uULWazB2biQ/SRuFuIAJAeI/AAAAAAAAAB0/VrpLt3n48ME/s1600-h/RoundedCornersWithoutRefresh.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5267951216608477666" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 179px; CURSOR: hand; HEIGHT: 297px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_uULWazB2biQ/SRuFuIAJAeI/AAAAAAAAAB0/VrpLt3n48ME/s320/RoundedCornersWithoutRefresh.png" border="0" /&gt;&lt;/a&gt; Yeuch! More "minutes" of investigation lead to the inclusion of the following code in the JavaScript file applying the dynamic styling to the page:&lt;/p&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;window.onfocus = ReapplyQuickLaunchCorners;&lt;/pre&gt;&lt;/div&gt;&lt;div style="BACKGROUND: white" color="black" size="10pt" face="Courier New"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; ReapplyQuickLaunchCorners()&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;{&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;    RemoveQuickLaunchCorners();&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;    AddQuickLaunchCorners();&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;/div&gt;&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt; RemoveQuickLaunchCorners()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    $(&lt;span style="color:#a31515;"&gt;"div.ms-quicklaunchouter&amp;gt;div:not(.ms-quickLaunch)"&lt;/span&gt;).remove();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    $(&lt;span style="color:#a31515;"&gt;"div.ms-quickLaunch h3.ms-standardheader span div.ms-quicklaunchheader&amp;gt;div"&lt;/span&gt;).remove();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    $(&lt;span style="color:#a31515;"&gt;"table.ms-recyclebin:last td&gt;div"&lt;/span&gt;).remove();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;Not a nice solution (OK, it's a hack!) but it works and I ran out of time.&lt;/p&gt;&lt;p&gt;So where am I leading with this post - well, just to illustrate the great things you can do with jQuery to mould SharePoint. Sometime I'll blog about using jQuery for AJAX calls to the MOSS profile search web services, but that's for another time.....&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-5306181013934780456?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/5306181013934780456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=5306181013934780456' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5306181013934780456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5306181013934780456'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/11/jquery-in-sharepoint-example-rounded.html' title='jQuery in SharePoint Example - Rounded Corners'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_uULWazB2biQ/SRuD-Lo3UoI/AAAAAAAAABs/iJyVSvz_WJg/s72-c/RoundedCorners.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2967076750159851721</id><published>2008-11-02T12:19:00.000-08:00</published><updated>2008-11-03T15:03:48.578-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='talk'/><title type='text'>jQuery Introduction Talk at Christchurch Code Camp</title><content type='html'>Gave a 5 minute lightning talk on "A Brief Introduction to jQuery" at the Christchurch Code Camp on Saturday - didn't quite get to my last slide in the 5 minutes and Dave Mateer took great delight in "riffing" me off the stage with his electric guitar turned up loud!&lt;br /&gt;&lt;br /&gt;Really like the lightning talk concept - you don't need to be an expert on the subject, and they are very easy to prepare for, given that you can run through the slides lots of times beforehand (though having said that, I obviously didn't practice enough to get my talk short enough!).&lt;br /&gt;&lt;br /&gt;I have published &lt;a href="http://www.smallsteps.co.nz/files/jqueryintro.ppt"&gt;the slide deck&lt;/a&gt; from my talk - it includes an overview of a couple of ways in which I recently solved SharePoint UI requirements using jQuery, including a way of adding rounded corners to the quicklaunch menu using the &lt;a href="http://www.methvin.com/jquery/jq-corner-demo.html"&gt;jQuery.Corner&lt;/a&gt; library.&lt;br /&gt;&lt;br /&gt;Amongst the talks on the day were:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Ivan Towlson talked conceptually on &lt;a href="http://hestia.typepad.com/flatlander/files/thinking_in_wpf.pptx"&gt;Thinking in WPF&lt;/a&gt;&lt;/li&gt;&lt;li&gt;John Rusk on &lt;a href="http://dotnet.agilekiwi.com/blog/2008/11/future-of-linq-to-sql.html"&gt;Linq to SQL&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Matt Smith on &lt;a href="http://blog.mattsmith.co.nz/Lists/Posts/Post.aspx?ID=45"&gt;Productive SharePoint Development&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Kirk Jackson on &lt;a href="http://pageofwords.com/blog/2008/11/01/ChristchurchCodeCampOvercomingYourWebInsecurity.aspx"&gt;Overcoming your Web Insecurity&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Andy Scrase on &lt;a href="http://www.buildwith.net/blog/2008/10/30/SlidesForC30CodecampSession.aspx"&gt;C#3.0&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Just wanted to say well done to the small team of organisers who did a great job in a short time - those half million listeners of &lt;a href="http://www.dotnetrocks.com/"&gt;Dot Net Rocks&lt;/a&gt; who heard the announcement about the camp but who didn't attend missed out on a treat!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2967076750159851721?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2967076750159851721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2967076750159851721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2967076750159851721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2967076750159851721'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/11/jquery-introduction-talk-at.html' title='jQuery Introduction Talk at Christchurch Code Camp'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4988905149150182362</id><published>2008-10-20T13:57:00.001-07:00</published><updated>2008-10-20T14:13:06.518-07:00</updated><title type='text'>Revisiting ddwrt and FormatDate</title><content type='html'>I have had some feedback on the &lt;a href="http://sharethelearning.blogspot.com/2007/05/formatflag-in-ddwrtformatdate-method.html"&gt;my posting&lt;/a&gt; in May 2007 about the ddwrt FormatDate function, including a request to see additional formats.&lt;br /&gt;&lt;br /&gt;Therefore I had a play with some reflection code, and have created a little command line application that can be used to see the available date formats output by the ddwrt utility.&lt;br /&gt;&lt;br /&gt;Note that this code could be used to experiment with the output of some of the other ddwrt functions in the &lt;b&gt;Microsoft.SharePoint.WebPartPages.DdwRuntime&lt;/b&gt; library - to see a list of the other functions, open up the Microsoft.SharePoint dll in Reflector.&lt;br /&gt;&lt;br /&gt;One other tip - a list of the LCID values is available in &lt;a href="http://sharethelearning.blogspot.com/2007/03/formating-dates-times-and-currency-in.html"&gt;this post&lt;/a&gt; on my blog&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Globalization;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Reflection;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Text;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;namespace&lt;/span&gt; DDWRT.FormatDate&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;Program&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Main(&lt;span style="color: blue;"&gt;string&lt;/span&gt;[] args)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: #2b91af;"&gt;CultureInfo&lt;/span&gt; ci = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;CultureInfo&lt;/span&gt;(1031);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: #2b91af;"&gt;Console&lt;/span&gt;.WriteLine(RunDDWRT(&lt;span style="color: #a31515;"&gt;&amp;quot;05-09-2007 11:00&amp;quot;&lt;/span&gt;, ci));&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;catch&lt;/span&gt; (&lt;span style="color: #2b91af;"&gt;Exception&lt;/span&gt; ex)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: #2b91af;"&gt;Console&lt;/span&gt;.WriteLine(ex.ToString());&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;Console&lt;/span&gt;.ReadLine();&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&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;static&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; RunDDWRT(&lt;span style="color: blue;"&gt;string&lt;/span&gt; szDate, &lt;span style="color: #2b91af;"&gt;CultureInfo&lt;/span&gt; ci)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;string&lt;/span&gt; fullName = &lt;span style="color: #a31515;"&gt;&amp;quot;Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;StringBuilder&lt;/span&gt; sb = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;StringBuilder&lt;/span&gt;();&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;//Load the SharePoint Assembly&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;Assembly&lt;/span&gt; assem = &lt;span style="color: #2b91af;"&gt;Assembly&lt;/span&gt;.Load(fullName);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;// Reference the DDWRT namespace&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;Type&lt;/span&gt; type = assem.GetType(&lt;span style="color: #a31515;"&gt;&amp;quot;Microsoft.SharePoint.WebPartPages.DdwRuntime&amp;quot;&lt;/span&gt;, &lt;span style="color: blue;"&gt;true&lt;/span&gt;, &lt;span style="color: blue;"&gt;true&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;//Find the sought method in DDWRT (the &amp;quot;FormatDateTime&amp;quot; method)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;MethodInfo&lt;/span&gt; methodInfo = &lt;span style="color: blue;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;MethodInfo&lt;/span&gt;[] methods = type.GetMethods();&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: #2b91af;"&gt;MethodInfo&lt;/span&gt; method &lt;span style="color: blue;"&gt;in&lt;/span&gt; methods)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: green;"&gt;//Uncomment the next line to see a list of all the methods available in the ddwrt class&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: green;"&gt;//sb.AppendLine(string.Format(&amp;quot;&amp;nbsp; {0}&amp;quot;, method.Name));&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (method.Name == &lt;span style="color: #a31515;"&gt;&amp;quot;FormatDate&amp;quot;&lt;/span&gt;)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; methodInfo = method;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&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; (methodInfo != &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: blue;"&gt;object&lt;/span&gt; objectInstance = &lt;span style="color: #2b91af;"&gt;Activator&lt;/span&gt;.CreateInstance(type);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendLine(&lt;span style="color: #a31515;"&gt;&amp;quot;ddwrt.FormatDate Test&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.Append(&lt;span style="color: #a31515;"&gt;&amp;quot;Locale LCID:&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\t&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.Append(&lt;span style="color: blue;"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #a31515;"&gt;&amp;quot;{0} ({1})&amp;quot;&lt;/span&gt;, ci.LCID.ToString(), ci.Name));&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.Append(&lt;span style="color: #a31515;"&gt;&amp;quot;Date to format:&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\t&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.Append(szDate);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.Append(&lt;span style="color: #a31515;"&gt;&amp;quot;FormatFlag&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\t&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.Append(&lt;span style="color: #a31515;"&gt;&amp;quot;Formatted Date&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: blue;"&gt;for&lt;/span&gt; (&lt;span style="color: blue;"&gt;long&lt;/span&gt; formatFlag = 1; formatFlag &amp;lt; 16; formatFlag++)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: blue;"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;string&lt;/span&gt; formattedDateTime = (&lt;span style="color: blue;"&gt;string&lt;/span&gt;)methodInfo.Invoke(objectInstance, &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;Object&lt;/span&gt;[] { szDate, ci.LCID, formatFlag });&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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;&amp;nbsp;&amp;nbsp; sb.Append(formatFlag);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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;&amp;nbsp;&amp;nbsp; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\t\t&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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;&amp;nbsp;&amp;nbsp; sb.Append(formattedDateTime);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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;&amp;nbsp;&amp;nbsp; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; &lt;span style="color: blue;"&gt;catch&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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;&amp;nbsp;&amp;nbsp; sb.Append(formatFlag);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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;&amp;nbsp;&amp;nbsp; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\t\t&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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;&amp;nbsp;&amp;nbsp; sb.Append(&lt;span style="color: #a31515;"&gt;&amp;quot;--------&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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;&amp;nbsp;&amp;nbsp; sb.AppendFormat(&lt;span style="color: #a31515;"&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&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; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&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; sb.ToString();&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4988905149150182362?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4988905149150182362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4988905149150182362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4988905149150182362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4988905149150182362'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/10/revisiting-ddwrt-and-formatdate.html' title='Revisiting ddwrt and FormatDate'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7492024525569053355</id><published>2008-10-01T21:54:00.000-07:00</published><updated>2008-11-12T16:48:38.029-08:00</updated><title type='text'>Displaying the Raw Search Results</title><content type='html'>Here's a little tidbit I usually end up searching for when manipulating search results - so it must be time to link to it here:&lt;br /&gt;&lt;a style="MARGIN-LEFT: 15px" href="http://msdn.microsoft.com/en-us/library/ms546985.aspx"&gt;How to: View Search Results XML Data&lt;/a&gt;&lt;br /&gt;(Also see &lt;a href="http://www.sharepointology.com/development/customize-the-people-search-results-part-1/"&gt;Customize the People Search Results&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;This gives a rundown on the XSL to use to show the raw XML that is returned to a search results web part (such as the "CoreResultsWebPart").&lt;br /&gt;&lt;br /&gt;Basically, use the following:&lt;br /&gt;&amp;lt;xsl:stylesheet version="1.0" xsl="http://www.w3.org/1999/XSL/Transform"&amp;gt;&lt;br /&gt;&amp;lt;xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"&amp;gt;&lt;br /&gt;&amp;lt;xsl:template match="/"&amp;gt;&lt;br /&gt;&amp;lt;xmp&amp;gt;&amp;lt;xsl:copy-of select="*"&amp;gt;&amp;lt;/xmp&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&amp;lt;/xsl:stylesheet&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7492024525569053355?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7492024525569053355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7492024525569053355' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7492024525569053355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7492024525569053355'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/10/displaying-raw-search-results.html' title='Displaying the Raw Search Results'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4478035045231449240</id><published>2008-10-01T21:34:00.000-07:00</published><updated>2008-10-01T21:54:18.771-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='customisation'/><title type='text'>Custom Web Part Pages Template Woes</title><content type='html'>Seems to have been plenty of people that have tried to extend the list Web Part Page templates made available on the &lt;i&gt;spcf.aspx&lt;/i&gt; page. And it seems that the approach outlined in the Microsoft article "&lt;A href="http://msdn.microsoft.com/en-us/library/ms916835.aspx"&gt;Creating Custom Web Part Page Templates for Microsoft SharePoint Products and Technologies&lt;/a&gt;" just doesn't work with SharePoint v3.&lt;br /&gt;&lt;br /&gt;The approach of adding an additional option to the list of templates in a custom &lt;i&gt;custspcf.aspx&lt;/i&gt; page seems to fail (with the "Invalid URL Parameter" message) for the following reason: according to the WSS SDK, the NewWebPage RPC method accepts a value for the WebPartPageTemplate of between 1 and 8. &lt;br /&gt;&lt;br /&gt;That must explain why adding a ninth template to the list fails - the call to the NewWebPage method OWSSVR.DLL doesn't expect a number above 8. For the background, &lt;a href="http://jopx.blogspot.com/2006/02/sharepoint-webpartpages.html"&gt;here is a discussion&lt;/a&gt; on OWSSVR by Joel Oleson.&lt;br /&gt;&lt;br /&gt;So I guess the options if different Web Part Page templates are required are to either &lt;ul&gt;&lt;li&gt;Replace the standard ones that are located in 12\TEMPLATE\1033\STS\DOCTEMP\SMARTPGS, or to&lt;/li&gt;&lt;li&gt;Create a completely custom template selection page - but I am finding that there are some real oddities in the names of pages that appear in search results when web part pages are created in a custom manner.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Another area that needs attention in vNext!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4478035045231449240?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4478035045231449240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4478035045231449240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4478035045231449240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4478035045231449240'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/10/custom-web-part-pages-template-woes.html' title='Custom Web Part Pages Template Woes'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6951430461360068616</id><published>2008-08-05T20:37:00.000-07:00</published><updated>2008-08-07T22:52:42.386-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='wiki'/><title type='text'>Adding Default Content to a SharePoint Wiki</title><content type='html'>&lt;div&gt;If you create a new Wiki through a list instance in a feature, through a site definition or programmatically, the default How To and Home page will not appear in that Wiki.&lt;br /&gt;&lt;br /&gt;To add those page, the Microsoft.SharePoint.Utilities.SPUtility class offers the following public static method:&lt;br /&gt;&lt;br /&gt;&lt;div style="MARGIN-LEFT: 30px"&gt;AddDefaultWikiContent(SPList wikiList)&lt;/div&gt;&lt;br /&gt;Call this method to add those default pages. Or if you want more control over the content of the provisioned pages, use &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt; to disassemble the following DLL and have a look at the code in that method to see how it is done:&lt;br /&gt;&lt;br /&gt;&lt;div style="MARGIN-LEFT: 30px; FONT-STYLE: italic"&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI\Microsoft.SharePoint.dll&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6951430461360068616?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6951430461360068616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6951430461360068616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6951430461360068616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6951430461360068616'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/08/adding-default-content-to-sharepoint.html' title='Adding Default Content to a SharePoint Wiki'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-3418719250512631059</id><published>2008-08-05T17:07:00.000-07:00</published><updated>2008-08-05T18:07:34.239-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><title type='text'>Another Way to Enrich Your SharePoint Forms - JQuery</title><content type='html'>I'm still enjoying that honeymoon period with a new tool in my SharePoint developer "bag of tricks" - &lt;a href="http://docs.jquery.com/Tutorials"&gt;JQuery&lt;/a&gt;. Such a powerful library!&lt;br /&gt;&lt;br /&gt;As an example of its usefulness, in a recent project I needed to modify the behaviour of search scope checkboxes on an advanced search page in SharePoint (enforcing that the 'All Sites' checkbox is ticked if the user clears all other checkboxes).&lt;br /&gt;&lt;br /&gt;Here's the steps I took using JavaScript plus JQuery:&lt;br /&gt;1. Encapsulate the minified &lt;a href="http://docs.jquery.com/Downloading_jQuery"&gt;JQuery library&lt;/a&gt; in a SahrePoint feature in order to deploy across the farm.&lt;br /&gt;2. Add a script tag referencing the JQuery JS file in the 'PlaceHolderTitleAreaClass' content placeholder of the search page.&lt;br /&gt;3. Add a Content Editor Web Part to the search page, and open the source view for that web part.&lt;br /&gt;4. Add the following JavaScript function to the content editor source (to enable custom JavaScript to be called on page load):&lt;br /&gt;&lt;div style="font-family:Courier New;font-size:10pt;color:black;"&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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;function&lt;/span&gt; addLoadEvent(func){&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt; oldonload = window.onload;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: blue;"&gt;typeof&lt;/span&gt; window.onload != &lt;span style="color: #a31515;"&gt;'function'&lt;/span&gt;) {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; window.onload = func;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span style="color: blue;"&gt;else&lt;/span&gt; {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; window.onload = &lt;span style="color: blue;"&gt;function&lt;/span&gt; () {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7&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; (oldonload) {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;8&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; oldonload();&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; func();&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;13&lt;/span&gt;&amp;nbsp;}&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;5. Call a click handler processing function on page load with the following:&lt;br /&gt;&lt;div style="FONT-SIZE: 10pt; MARGIN-LEFT: 20px; COLOR: black; FONT-FAMILY: Courier New"&gt;addLoadEvent(AddOnClickHandlers);&lt;/div&gt;&lt;br /&gt;6. Add a function to assign onclick handlers to the targetted checkboxes. This is where the power of JQuery shines through - notice the short expression in line 5 that retrieves references to only the checkboxes I am seeking (these checkboxes are contained in table cells attributed with the class 'ms-advsrchText')&lt;br /&gt;&lt;div style="font-family: Courier New; font-size: 10pt; color: black;"&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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: green;"&gt;//Add an onclick event handler for each of the checkboxes in the search form &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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: green;"&gt;//(the checkboxes are identified by the 'ms-advsrchText' class applied to their containing table cells)&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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;function&lt;/span&gt; AddOnClickHandlers() {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;//Get the checkboxes in the form&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt; chks = $(&lt;span style="color: #a31515;"&gt;'td.ms-advsrchText'&lt;/span&gt;).find(&lt;span style="color: #a31515;"&gt;':checkbox'&lt;/span&gt;).&lt;span style="color: blue;"&gt;get&lt;/span&gt;();&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;for&lt;/span&gt;(&lt;span style="color: blue;"&gt;var&lt;/span&gt; i=0;i&amp;lt;chks.length;i++)&amp;nbsp; {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; chks[i].onclick = SetFormState;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;8&lt;/span&gt;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9&lt;/span&gt;&amp;nbsp;}&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;7. Write the onclick event handler - this needs to find the check box labelled "All Sites" and check its status. I have not included all the code, just a few lines showing more use of JQuery. Line 12 builds a selection expression to get the next sibling for each check box; the next sibling is a label whose text contains the scope name (e.g. "All Sites").&lt;br /&gt;&lt;div style="font-family:Courier New;font-size:10pt;color:black;"&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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;function&lt;/span&gt; SetFormState() {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;//... OTHER CODE ...&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;//Get the scope checkboxes in the search form&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt; chks = $(&lt;span style="color: #a31515;"&gt;'td.ms-advsrchText'&lt;/span&gt;).find(&lt;span style="color: #a31515;"&gt;':checkbox'&lt;/span&gt;).&lt;span style="color: blue;"&gt;get&lt;/span&gt;();&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;//Enumerate through the check boxes&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;8&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;for&lt;/span&gt;(&lt;span style="color: blue;"&gt;var&lt;/span&gt; i=0;i&amp;lt;chks.length;i++) {&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;//Get the next sibling to the checkbox, which is a label element that contains the descriptive text. &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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: green;"&gt;//This text is assumed to always be 'All Sites' for the main search scope&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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: blue;"&gt;var&lt;/span&gt; lbl = $(&lt;span style="color: #a31515;"&gt;'#'&lt;/span&gt; + chks[i].id + &lt;span style="color: #a31515;"&gt;' ~ label'&lt;/span&gt;).&lt;span style="color: blue;"&gt;get&lt;/span&gt;(0);&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: #2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;13&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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: green;"&gt;//Save the reference to the All Sites checkbox&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="margin: 0px;"&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: blue;"&gt;if&lt;/span&gt; (lbl.innerText == &lt;span style="color: #a31515;"&gt;'All Sites'&lt;/span&gt;) {&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So, the actual code to get at the required elements on the page is very brief, and the range of JQuery &lt;a href="http://docs.jquery.com/Selectors"&gt;selectors&lt;/a&gt; makes getting to the elements easy.&lt;br /&gt;&lt;br /&gt;One tip - notice the use of the Get() method call at the end of the JQuery expressions. This returns DOM elements that can then be manipulated with normal DOM scripting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-3418719250512631059?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/3418719250512631059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=3418719250512631059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3418719250512631059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3418719250512631059'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/08/another-way-to-enrich-your-sharepoint.html' title='Another Way to Enrich Your SharePoint Forms - JQuery'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-8271633343615227160</id><published>2008-07-27T13:26:00.000-07:00</published><updated>2008-07-27T14:11:05.305-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>The SharePoint Paradox - Too Many Hammers</title><content type='html'>It happens with each new custom development I am involved with on the SharePoint platform - that initial temptation to write custom code, to head down the technical and complex route to a solution. Comes from having a background in software development, I guess!&lt;br /&gt;&lt;br /&gt;The process of firing up Visual Studio and starting to code against the SharePoint APIs can thus become the "hammer" used to fix every "nail" (for "nail" read "business requirement").&lt;br /&gt;&lt;br /&gt;But that is missing the point of SharePoint - there are plenty of built-in features that can greatly reduce the need for custom development. And hence reduce the cost to the client. Take one recent example from my work - a client required a web part that displayed documents created or modified by the current user, with some particular requirements around the way the metadata was displayed. Some of the functionality in this web part had me hovering the mouse over the Visual Studio start program link, but a little further design work revealed that the good ole' Data View (Data Form) web part could satisfy their needs.&lt;br /&gt;&lt;br /&gt;The web part took around an hour to complete, with the necessary XSL jiggling. And one of the real benefits of taking this approach is the deployment - no WSP files to install on the server, no interruption to service. A simple text file to export and import.&lt;br /&gt;&lt;br /&gt;Perhaps this is a paradox with SharePoint - as a development platform of significant breadth, it offers lots of different hammers for each nail. Me, I try (often have to remind myself!) to pick the lightest-weight hammer possible for each task. Lightweight = quicker development cycle = more agile and more responsive to customer requirements.&lt;br /&gt;&lt;br /&gt;There is a proviso, of course (quite a major one) - the size of the client and their deployment/integration process may choose that hammer for you. The fast, lightweight approach that may be appropriate for clients with small, simple sites and a handful of users on a single server is unlikely to fit major organisations with strict control over the staging/QA/production environments. But even in that instance a Data View web part could be enveloped inside a SharePoint Feature and the deployment needs likely satisfied.&lt;br /&gt;&lt;br /&gt;One step missing from the process when using this lightweight means of solving IT needs is the testing, or rather the inclusion of automated, repeateable testing. Someday I'll get a chance to look at the web test various frameworks around and to see whether NUnit combined with, say, &lt;a href="http://haacked.com/archive/2007/08/02/art-of-test-webaii-looks-promising-for-testing-the-web.aspx"&gt;WebAii or WATIN&lt;/a&gt; will help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-8271633343615227160?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/8271633343615227160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=8271633343615227160' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8271633343615227160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8271633343615227160'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/07/sharepoint-paradox-too-many-hammers.html' title='The SharePoint Paradox - Too Many Hammers'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-9194943612881194929</id><published>2008-07-16T14:58:00.000-07:00</published><updated>2008-07-16T15:10:47.805-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><title type='text'>Getting that PDF Indexing to work in MOSS</title><content type='html'>Had a case where the latest Adobe IFilter had been installed, but the crawl log in MOSS was displaying "filtering process could not process this item" messages.&lt;br /&gt;&lt;br /&gt;The key to fixing this issue was the information in &lt;a href="http://blogs.msdn.com/ifilter/archive/2007/03/29/indexing-pdf-documents-with-adobe-reader-v-8-and-moss-2007.aspx"&gt;this post&lt;/a&gt; from the &lt;a href="http://blogs.msdn.com/ifilter/default.aspx"&gt;Filter Center&lt;/a&gt; blog: checking the registry key value, and then adding the path to the Acrobat Reader folder were the solutions. With those in place, a full scan correctly indexed the PDF documents.&lt;br /&gt;&lt;br /&gt;To save the search for the Adobe Acrobat PDF file icon logo for referencing in the DocIcons.xml file, here is the location of the GIF file on the Adobe site: &lt;a href="http://www.adobe.com/misc/linking.html"&gt;http://www.adobe.com/misc/linking.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Other useful aticles:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://support.microsoft.com/kb/832809/en-us"&gt;http://support.microsoft.com/kb/832809/en-us&lt;/a&gt; by Microsoft&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.joiningdots.net/blog/2007/05/sharepoint-2007-and-adobe-pdf.html"&gt;SharePoint 2007 and Adobe PDF&lt;/a&gt; by Joing the Dots - points out the fact that Acrobat Reader v8 &lt;strong&gt;installs the Ifilter by default!&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-9194943612881194929?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/9194943612881194929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=9194943612881194929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/9194943612881194929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/9194943612881194929'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/07/getting-that-pdf-indexing-to-work-in.html' title='Getting that PDF Indexing to work in MOSS'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4457561058814982857</id><published>2008-07-01T17:31:00.000-07:00</published><updated>2008-07-01T17:49:36.607-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Hide the "View All Site Content" Quick Launch Link</title><content type='html'>To hide this link from all but those users with full control over a WSS site, open the site master page in SharePoint Designer and find the &lt;span style="color:#993300;"&gt;SPSecurityTrimmedControl&lt;/span&gt; element that contains a div with class &lt;span style="color:#000099;"&gt;ms-quicklaunchheader&lt;/span&gt;. The quickest route to this is to view the page in split view, and click on the "View All Site Content" link in the design pane.&lt;br /&gt;&lt;br /&gt;The &lt;span style="color:#ff0000;"&gt;PermissionsString&lt;/span&gt; attribute of the &lt;span style="color:#993300;"&gt;SPSecurityTrimmedControl&lt;/span&gt; element determines what users can view this content. Change the value of this attribute to &lt;span style="color:#000099;"&gt;ManageWeb&lt;/span&gt; and only those users with rights to perform all admin tasks on the site will then be able to see the link on all pages in the site.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx"&gt;this page&lt;/a&gt; for a list of all the possible permission string values.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4457561058814982857?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4457561058814982857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4457561058814982857' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4457561058814982857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4457561058814982857'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/07/hide-view-all-site-content-quick-launch.html' title='Hide the &quot;View All Site Content&quot; Quick Launch Link'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-5289339655636993940</id><published>2008-06-17T18:31:00.000-07:00</published><updated>2008-06-17T18:48:44.826-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>WSS Search and Breadcrumb Links Fail over SSL</title><content type='html'>A site originally extended for extranet access needed to be now served over SSL, so I extended a new web application to enable this, and modified the external Alternate Access Mapping entry to be https rather than http.&lt;br /&gt;&lt;br /&gt;The site was then successfully accessible on the internet, though I did notice that the full path had to be entered in the browser address bar, including the page name itself - for example, &lt;b&gt;https://[siteurl]/default.aspx&lt;/b&gt; rather than just &lt;b&gt;https://[siteurl]&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Further testing revealed that the links in the breadcrumbs all led to a "Page cannot be diaplayed" IE error, and submitting a search on the site gave an error message on the results page that stated:  &lt;div style="position:relative;left:25px;width:90%;margin-top:10px;margin-bottom:0;font-style:italic;"&gt;"If the URL should be serving existing content, the system administrator may need to add a new request url mapping to the intended application"&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The cause was all in the AAM entry - I had a port number (80) in the extranet URLs from some early trials, and had not removed this port number when setting &lt;b&gt;https&lt;/b&gt;. By setting the Extranet zone AAM internal URL and public URL to be simply https://[ssiteurl], these problems were solved.&lt;br /&gt;&lt;br /&gt;Interesting that the pages were still accessible with an incorrect Access Mapping!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-5289339655636993940?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/5289339655636993940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=5289339655636993940' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5289339655636993940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5289339655636993940'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/06/wss-search-and-breadcrumb-links-fail.html' title='WSS Search and Breadcrumb Links Fail over SSL'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2508408427760419446</id><published>2008-06-16T18:31:00.000-07:00</published><updated>2008-06-16T19:17:46.526-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='hosting'/><title type='text'>Double-check your hosting company's infrastructure</title><content type='html'>Story from the trenches today - a few weeks ago I customised a hosted WSS site, including UI changes and a small amount of functionality.&lt;br /&gt;&lt;br /&gt;Somehow in one of the admin pages, the hosting company had exposed the capability to delete the complete site. So when my client did accidentally make use of that "feature", he called the hosting company to request a restore of the site.&lt;br /&gt;&lt;br /&gt;Unfortunately, the hosting company discovered that they only actually have disaster recovery backup for an entire server farm. No application-level backup in place. It would take them 5 man days to retrieve the site.&lt;br /&gt;&lt;br /&gt;Luckily, the site had not been used yet, so no data was lost. Just means that I have to rebuild from scratch... I had presumed that a hosted site would be safe, and so made no form of local backup.&lt;br /&gt;&lt;br /&gt;So, in the words of Carl Franklin in &lt;a href="http://mondays.pwop.com/"&gt;Mondays&lt;/a&gt; (listen if you dare!),  Things I have Learnt This Week:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Check the recovery options offered by a hosting company&lt;/li&gt;&lt;li&gt;Make your own backups of any customisations on hosted sites&lt;/li&gt;&lt;li&gt;Write reminders for yourself of any tricky little changes to make a site work as required&lt;/li&gt;&lt;li&gt;Take lots of screenshots&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The latter point is worth reviewing. In this project I had taken a few screen shots of various pages within the site as development progressed, primarily to send to the client to show current state of play. Now I am using these screen shots to help recreate the site. &lt;/p&gt;&lt;p&gt;On the subject of screen shots. I use either &lt;a href="http://www.codeplex.com/cropper"&gt;Cropper&lt;/a&gt; or &lt;a href="http://www.faststone.org/FSCaptureDetail.htm"&gt;Faststone Capture&lt;/a&gt; for this task. Cropper is a free .net util, whereas Capture offers some nice easy image annotation options (plus ragged edges to images if required). Thoroughly recommend them both!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2508408427760419446?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2508408427760419446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2508408427760419446' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2508408427760419446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2508408427760419446'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/06/double-check-your-hosting-companys.html' title='Double-check your hosting company&apos;s infrastructure'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-1547128339420140427</id><published>2008-06-15T20:05:00.000-07:00</published><updated>2008-06-15T21:02:35.207-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='site definition'/><title type='text'>Site Definition Articles</title><content type='html'>Here's some articles to help me next time I'm creating MOSS and WSS Site Definitions:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://hermansberghem.blogspot.com/2008/04/creating-corporate-intranet-using-moss.html"&gt;Creating an corporate intranet using MOSS&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a id="ctl00_Content_PostView_TitleLink" href="http://www.katriendg.com/aboutdotnet/2007-5-1-publishing-web-syntax-onet-xml.aspx"&gt;MOSS 2007 Publishing web site definition template – onet.xml – syntax for properties and getting the right content types&lt;/a&gt; by Katrein De Graeve&lt;/li&gt;&lt;li&gt;&lt;a href="http://clintcherry.spaces.live.com/blog/cns!AEC0DCBC460E45B9!456.entry"&gt;Custom Site Definitions in MOSS&lt;/a&gt; by Clinton Cherry&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-1547128339420140427?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/1547128339420140427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=1547128339420140427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1547128339420140427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1547128339420140427'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/06/site-definition-articles.html' title='Site Definition Articles'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7952656065375380746</id><published>2008-05-28T20:35:00.000-07:00</published><updated>2008-05-28T21:11:14.390-07:00</updated><title type='text'>Site Definition Fails to Use My Custom Home Page</title><content type='html'>Here's a minor annoyance that doesn't causes any in-your-face error messages, but can lead to a few deep frowns.&lt;br /&gt;&lt;br /&gt;A MOSS site created from my custom site definition failed to apply my custom master page to the default.aspx page. The &lt;span style="color:#ff0000;"&gt;MasterPageFile&lt;/span&gt; attribute in the default.aspx file in my Visual Studio project was certainly set to &lt;span style="color:#000099;"&gt;&lt;strong&gt;~masterurl/custom.master&lt;/strong&gt;&lt;/span&gt;, yet the deployed file in the associated SITETEMPLATES folder used the standard &lt;span style="color:#000099;"&gt;&lt;strong&gt;~masterurl/default.master&lt;/strong&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Turns out that I had missed an attribute from the &lt;file&gt; node in the &lt;modules&gt; node within ONET.XML. What I had initially was&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;file color="#cc0000"&gt;Url&lt;/span&gt;="&lt;span style="color:#000099;"&gt;default.aspx&lt;/span&gt;" &lt;span style="color:#cc0000;"&gt;NavBarHome&lt;/span&gt;="&lt;span style="color:#000099;"&gt;true&lt;/span&gt;"&gt;&lt;br /&gt;but what I needed was&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;file color="#cc0000"&gt;Url&lt;/span&gt;="&lt;span style="color:#000099;"&gt;default.aspx&lt;/span&gt;" &lt;strong&gt;&lt;span style="color:#cc0000;"&gt;Name&lt;/span&gt;="&lt;span style="color:#000099;"&gt;default.aspx&lt;/span&gt;"&lt;/strong&gt; &lt;span style="color:#cc0000;"&gt;NavBarHome&lt;/span&gt;="&lt;span style="color:#000099;"&gt;true&lt;/span&gt;"&gt;&lt;br /&gt;&lt;br /&gt;Yet the feature deployed, and the site was created. Could perhaps do with some "fail fast" philosophy in the implementation of some of these out-of-the-box operations rather than letting default values kick-in when there is a missing configuration value?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7952656065375380746?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7952656065375380746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7952656065375380746' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7952656065375380746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7952656065375380746'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/05/site-definition-fails-to-use-my-custom.html' title='Site Definition Fails to Use My Custom Home Page'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4244912518517264856</id><published>2008-05-06T18:12:00.000-07:00</published><updated>2008-05-06T19:02:39.780-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='features'/><title type='text'>Override the Edit Form SaveButton -  Part 1</title><content type='html'>An overview of how to override the action of the Save Button in a SharePoint form for a specific document library (in this case a Wiki library). The intention of this brief series of articles is to record how to add a custom behaviour to the Save button of a wiki edit form.&lt;br /&gt;&lt;br /&gt;The elements in this solution can be all included in a single Visual Studio solution, but I suggest that they are compiled into several separate SharePoint features for ease of management/deployment. All the features can be referenced in a single Manifest.xml file.&lt;br /&gt;&lt;br /&gt;1. Create a content type feature to define a custom content type for the document library. In the XmlDocument section of the ContentType definition, specify the name of a custom template for the edit form template:&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre {font-size:small;color:black;background-color:#ffffff;font-family:Consolas,"Courier New",Courier,Monospace;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt {background-color:#f4f4f4;width:100%;margin:0em;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;XmlDocuments&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;XmlDocument&lt;/span&gt; &lt;span class="attr"&gt;NamespaceURI&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;FormTemplates&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Display&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;DocumentLibraryForm&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Display&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Edit&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;b&gt;MyCustomWikiEditForm&lt;/b&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Edit&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;New&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;WikiEditForm&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;New&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;FormTemplates&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;XmlDocument&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;XmlDocuments&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;The result of this will be that any library using this content type will display the custom content (to be created in later steps) on the edit form.&lt;br /&gt;&lt;br /&gt;2. Create a user control file containing a new &lt;em&gt;RenderingTemplate&lt;/em&gt; with the&lt;br /&gt;template custom ID matching that in the custom content type.&lt;br /&gt;&lt;br /&gt;To achieve this, create the new ascx file in the Visual Studio solution (as an example, I'll name it MyCustomWikiEditForm.ascx). Copy the &lt;em&gt;Assembly&lt;/em&gt; and &lt;em&gt;Register&lt;/em&gt; tags from the top of DefaultTemplates.ascx (located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES).&lt;br /&gt;&lt;br /&gt;Then find (in DefaultTemplates.ascx) the &lt;em&gt;RenderingTemplate&lt;/em&gt; node for the template being replaced, and copy/paste this into the new ascx file - in this case, I would copy the complete &lt;em&gt;RenderingTemplate&lt;/em&gt; with ID of &lt;b&gt;WikiEditForm&lt;/b&gt; into my new ascx file. Rename the ID of the RenderingTemplate to match the custom ID from step 1 (i.e. to &lt;strong&gt;MyCustomWikiEditForm&lt;/strong&gt;).&lt;br /&gt;&lt;br /&gt;This new ASCX file will need to be deployed to the CONTROLTEMPLATES folder by stating the destination folder in a TemplateFiles node in the Manifest.xml for the solution, as in the following example snippet:&lt;pre class="csharpcode"&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TemplateFiles&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TemplateFile&lt;/span&gt; &lt;span class="attr"&gt;Location&lt;/span&gt;&lt;span class="kwrd"&gt;="CONTROLTEMPLATES\MyCustomWikiEditForm.ascx"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;TemplateFiles&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;In the next installment, I'll look at modifying the edit template to include a custom save button.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4244912518517264856?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4244912518517264856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4244912518517264856' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4244912518517264856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4244912518517264856'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/05/override-edit-form-savebutton-part-1.html' title='Override the Edit Form SaveButton -  Part 1'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4246208473047787460</id><published>2008-04-06T18:53:00.000-07:00</published><updated>2008-04-06T19:06:35.122-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Whoops, Where are Those Site Themes Hiding?</title><content type='html'>I am trying to persuade the application pages in a WSS site to look similar to the site pages that are customised by a master page - my approach was to create a new theme, and modify the CSS in that theme using the CSS applied to the master page.&lt;br /&gt;&lt;br /&gt;It almost worked, but had a nasty side-effect. Some part of the CSS caused the "select theme" list on the Site Theme admin page to be squashed out of screen space by the left-hand cells expanding too far across the page. The image of the still displayed, but there was no way to remove the bad theme.&lt;br /&gt;&lt;br /&gt;Oh dear, what to do?&lt;br /&gt;&lt;br /&gt;Then some playing in the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;amp;displaylang=en"&gt;IE Developer toolbar&lt;/a&gt; revealed a solution - the toolbar allows CSS styles to be edited and applied in the live page. I applied a width attribute to several of the cells in the affected table, and managed to reveal the theme list box in the displayed page, thereby allowing me to reapply the default theme before modifying the new theme.&lt;br /&gt;&lt;br /&gt;This difficulty in modifying the application pages to match the site pages is an oft-quoted citicism of SharePoint. During a little research for this post, I have noticed that Microsoft has published a KB article on their &lt;a href="http://support.microsoft.com/kb/944105/en-us"&gt;recommended server-side fix&lt;/a&gt; for this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4246208473047787460?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4246208473047787460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4246208473047787460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4246208473047787460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4246208473047787460'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/04/whoops-where-are-those-site-themes.html' title='Whoops, Where are Those Site Themes Hiding?'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7395069942600871884</id><published>2008-03-13T21:47:00.000-07:00</published><updated>2008-03-13T22:04:24.599-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>A Few Useful WSS Icons</title><content type='html'>Based on an idea in the &lt;a href="http://autosponge.spaces.live.com/Blog/cns!D7F85948C20F0293!296.entry"&gt;AutoSponge&lt;/a&gt; blog, here are content editor web parts that display some of the icons available in WSS:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;WSS &lt;a href="http://www.smallsteps.co.nz/resources/wss_disk_icons.dwp"&gt;Disk Icons&lt;/a&gt;&lt;/li&gt;&lt;li&gt;WSS &lt;a href="http://www.smallsteps.co.nz/resources/wss_document_icons.dwp"&gt;Document Icons&lt;/a&gt; - 16x16 icons of commonly-used documents&lt;/li&gt;&lt;li&gt;A &lt;a href="http://www.smallsteps.co.nz/resources/WSS_Miscellaneous_Icons.dwp"&gt;miscellany&lt;/a&gt; of other WSS icons&lt;/li&gt;&lt;/ul&gt;You can simply import these into any page on a WSS site to see the icons - right click on the links above, save the dwp files and then import 'em.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7395069942600871884?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7395069942600871884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7395069942600871884' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7395069942600871884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7395069942600871884'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/03/few-useful-wss-icons.html' title='A Few Useful WSS Icons'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-1464831831943250069</id><published>2008-02-28T22:19:00.000-08:00</published><updated>2008-02-29T01:51:16.625-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><title type='text'>Why Reflector is a Developer's Friend</title><content type='html'>If you have been wondering why some .net developers rave about &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt; as the one tool that rules them all, and have thought that maybe you should give it a try, here's a little tale about how it made my day better... (hope it encourages you)&lt;br /&gt;&lt;br /&gt;Whilst attempting to bind an &lt;em&gt;SPGridView&lt;/em&gt; to a &lt;em&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.linqdatasource.aspx"&gt;LinqDataSource&lt;/a&gt;&lt;/em&gt;, one of the requirements was to use the filtering features of the SharePoint gridview (that's one of it's strengths above the standard &lt;em&gt;GridView&lt;/em&gt; control).&lt;br /&gt;&lt;br /&gt;I came across a &lt;a href="http://www.sharepointblogs.com/bobsbonanza/archive/2007/07/02/filtering-with-spgridview.aspx"&gt;post&lt;/a&gt; by &lt;a href="http://www.sharepointblogs.com/user/Profile.aspx?UserID=3153"&gt;Robert Fridén&lt;/a&gt; that described how to enable filtering when binding to an &lt;em&gt;ObjectDataSource&lt;/em&gt;. An &lt;em&gt;SPGridView&lt;/em&gt; property named &lt;em&gt;FilteredDataSourcePropertyName&lt;/em&gt; needs to be set, and that must contain the name of the property on the bound datasource which will be called when filtering the data. In other words, it requires a string containing the name of a control property.&lt;br /&gt;&lt;br /&gt;For an &lt;em&gt;ObjectDataSource&lt;/em&gt;, that property is named "FilterExpression". I decided it was highly unlikely that the &lt;em&gt;LinqDataSource&lt;/em&gt; would use the same property name, so I turned to Reflector.&lt;br /&gt;&lt;br /&gt;In Reflector, I found and opened the &lt;em&gt;System.Web.Extensions&lt;/em&gt; dll, browsed to the &lt;em&gt;LinqDataSource&lt;/em&gt; class and then looked through the properties. Didn't need to right-click and disassemble the dll in this case, as one of the properties was named "Where". Sounded a good option for filtering. So I used that as the &lt;em&gt;FilteredDataSourcePropertyName&lt;/em&gt; value, played around a little with the &lt;em&gt;FilteredDataSourcePropertyFormat&lt;/em&gt; property of &lt;em&gt;SPGridView&lt;/em&gt;, and &lt;span style="color:#006600;"&gt;&lt;strong&gt;hey presto&lt;/strong&gt;&lt;/span&gt; the filtering worked. Sure, I could have looked through the MSDN documentation, but with Reflector I can browse inside the methods of the data source class if needed.&lt;br /&gt;&lt;br /&gt;If you've not yet delved inside the .Net dlls with Reflector, give it a go. You'll be rewarded!&lt;br /&gt;&lt;br /&gt;...and by the way, as tempting as it was I just couldn't bring myself to put the word"best" in the title ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-1464831831943250069?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/1464831831943250069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=1464831831943250069' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1464831831943250069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1464831831943250069'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/02/why-reflector-is-developers-friend.html' title='Why Reflector is a Developer&apos;s Friend'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-8029839602050456443</id><published>2008-02-24T17:03:00.000-08:00</published><updated>2008-02-24T17:12:16.298-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtual machine'/><title type='text'>VMWare Virtual Machine 'Failed to Lock the File'</title><content type='html'>Scary moment occurred last week when one of my virtual machines failed to start from VMWare Workstation. The reported error was "failed to lock the file". A bit of searching revealed that I needed to delete the .LCK file in the VM's folder.&lt;br /&gt;&lt;br /&gt;The cause for this (I think) was that I had opened the virtual disk of this VM as a mapped drive on the host machine (&lt;em&gt;&lt;strong&gt;TIP:&lt;/strong&gt;&lt;/em&gt; very useful feature to get at files from the VM without powering it up - just right click on the .VMDK file in Windows Explorere, and you'll see a couple of options there to map the disk as a drive). That drive was still mapped when trying to start the VM, meaning that the host machine was accessing the VM's files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-8029839602050456443?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/8029839602050456443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=8029839602050456443' title='101 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8029839602050456443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8029839602050456443'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/02/vmware-virtual-machine-failed-to-lock.html' title='VMWare Virtual Machine &apos;Failed to Lock the File&apos;'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>101</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-1401148659154284418</id><published>2008-02-14T23:31:00.000-08:00</published><updated>2008-02-15T00:05:53.996-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><title type='text'>Some OWSSVR Parameters are Case-Sensitive</title><content type='html'>Experimenting with some owssvr URL protocol calls today, and kept getting error pages back when trying to retrieve data from a particular view by specifying a "View" parameter in the querystring&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:11;position:relative;left:15px"&gt;e.g. http://[site url]/_vti_bin/owssvr.dll?CS=109&amp;amp;List={list Guid}&amp;amp;View={View Guid}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Tried swapping various list ids, and removing the view id parameter. Well, it turns out that the View ID is CASE-SENSITIVE, yet the List ID value is not case-sensitive. Cunning way to throw me off the scent, there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-1401148659154284418?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/1401148659154284418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=1401148659154284418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1401148659154284418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1401148659154284418'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/02/some-owssvr-parameters-are-case.html' title='Some OWSSVR Parameters are Case-Sensitive'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7369648932557567259</id><published>2008-02-04T15:06:00.000-08:00</published><updated>2008-02-04T15:11:58.656-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><title type='text'>MOSS Search Box Missing Search Scopes</title><content type='html'>Had a situation where the search box on the SharePoint home page on a MOSS site was missing the "All Sites" and "People" options in the search scope dropdown.&lt;br /&gt;&lt;br /&gt;Luckily John M. Cass has &lt;a href="http://insidesharepoint.blogspot.com/2007/06/and-now-another-word-form-our.html"&gt;posted a fix&lt;/a&gt; - if the display group named "Search Dropdown" is missing (you only see the group named "Unused Scopes" on the Search Scopes admin page in the Site Settings), add a new group named "Search Dropdown" and add the two scopes to that group.&lt;br /&gt;&lt;br /&gt;Thanks for that, &lt;a href="http://insidesharepoint.blogspot.com/"&gt;John&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7369648932557567259?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7369648932557567259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7369648932557567259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7369648932557567259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7369648932557567259'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/02/moss-search-box-missing-search-scopes.html' title='MOSS Search Box Missing Search Scopes'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7618674399306903178</id><published>2008-01-30T17:34:00.001-08:00</published><updated>2008-01-30T17:39:18.573-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><title type='text'>Incorrect Alternative Access Mapping Removes Search Scope Options</title><content type='html'>Experimenting a little with MOSS today, I found that if I set the Alternative Access Mapping of a MOSS site to be incorrect, then the search scope dropdown box in the associated site loses two of the standard search scope options. &lt;br /&gt;&lt;br /&gt;After setting the AAM to the wrong value, the dropdown only offers the "This Site:..." option. The "All Sites" and "People" scopes are missing until I correct the AAM value.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7618674399306903178?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7618674399306903178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7618674399306903178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7618674399306903178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7618674399306903178'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/01/incorrect-alternative-access-mapping.html' title='Incorrect Alternative Access Mapping Removes Search Scope Options'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4583927352333981788</id><published>2008-01-10T15:48:00.000-08:00</published><updated>2008-01-10T15:57:50.382-08:00</updated><title type='text'>A Wrong (!) Exception Message when Applying SPWebConfigModification</title><content type='html'>Found that there is an error in an exception message associated with SPWebConfigModifications. The error message I was getting was as follows:&lt;br /&gt;&lt;br /&gt;&lt;div style="position:relative;left:20px;font-style:italic"&gt;Failed to apply a web.config modification to file "&lt;span style="color:red"&gt;configuration/runtime&lt;/span&gt;". The specified node "&lt;span style="color:red"&gt;c:\inetpub\wwwroot\wss\virtualdirectories\100\web.config&lt;/span&gt;" was not found in the web.config file.&lt;/div&gt;&lt;br /&gt;Just in case I was setting reversed values, I debugged for a while then opened up reflector. Seems that the author of SPWebConfigFileChanges got the parameter order wrong when deriving the exception message in ApplyModificationsWebConfigXmlDocument()!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4583927352333981788?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4583927352333981788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4583927352333981788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4583927352333981788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4583927352333981788'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/01/wrong-exception-message-when-applying.html' title='A Wrong (!) Exception Message when Applying SPWebConfigModification'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-997690999074819033</id><published>2008-01-10T15:24:00.000-08:00</published><updated>2008-01-10T15:47:17.725-08:00</updated><title type='text'>Adding a BindingRedirect to Web.Config Using SPWebConfigModification</title><content type='html'>Had a need to remap some DLLs developed for a SharePoint site to different versions of third party libraries (the DLLs had been compiled against other versions of the libraries).&lt;br /&gt;&lt;br /&gt;Found that this can be achieved by adding Binding Redirect nodes to the web.config file of the SharePoint web application. Actually getting this to work, however, is not straightforward; the main cause for complexity is that the parent node in the config file (the assemblyBinding node) has it's own namespace. This requires careful Xpath in the SPWebConfigModification name and path values.&lt;br /&gt;&lt;br /&gt;Here are the necessary values:&lt;br /&gt;&lt;div class='code' style='font-style:italic;'&gt;&lt;br /&gt;&lt;font color='blue'&gt;string&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;path&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"configuration/runtime/*[namespace-uri()='urn:schemas-microsoft-com:asm.v1'&amp;nbsp;and&amp;nbsp;local-name()='assemblyBinding']"&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;&lt;br /&gt;string&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;name&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;string&lt;/font&gt;&lt;font color='black'&gt;.Format(&lt;/font&gt;&lt;font color='#808080'&gt;"*[namespace-uri()='urn:schemas-microsoft-com:asm.v1'&amp;nbsp;and&amp;nbsp;local-name()='dependentAssembly']/*[namespace-uri()='urn:schemas-microsoft-com:asm.v1'&amp;nbsp;and&amp;nbsp;local-name()='assemblyIdentity'][@name='{0}']/parent::*"&lt;/font&gt;&lt;font color='black'&gt;,&amp;nbsp;LibraryName)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Use these in conjunction with the following code to create the necessary value to be inserted into the web config file:&lt;br /&gt;&lt;div class='code' style='font-style:italic;'&gt;&lt;br /&gt;&lt;font color='blue'&gt;string&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;WebConfigElement&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;@"&amp;lt;dependentAssembly&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;assemblyIdentity&amp;nbsp;name='{0}'&amp;nbsp;publicKeyToken='{1}'&amp;nbsp;culture='neutral'&amp;nbsp;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;bindingRedirect&amp;nbsp;oldVersion='{2}'&amp;nbsp;newVersion='{3}'&amp;nbsp;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/dependentAssembly&amp;gt;"&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;string&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;webConfigValue&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;string&lt;/font&gt;&lt;font color='black'&gt;.Format(WebConfigElement,&amp;nbsp;LibraryPublicToken,&amp;nbsp;LibraryName,&amp;nbsp;OldVersion,&amp;nbsp;NewVersion)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;Where LibraryPublicToken, LibraryName, OldVersion and NewVersion are the string values to be inserted into the bindingRedirect node that will be added to the web.config.&lt;br /&gt;&lt;br /&gt;Set the owner, sequence and type for the SPWebConfigModification, and apply to create the new config file entry:&lt;br /&gt;&lt;div class='code' style='font-style:italic;'&gt;&lt;br /&gt;SPWebConfigModification&amp;nbsp;mod&amp;nbsp;=&amp;nbsp;new&amp;nbsp;SPWebConfigModification(name,&amp;nbsp;path);&lt;br /&gt;mod.Value&amp;nbsp;=&amp;nbsp;webConfigValue;&lt;br /&gt;mod.Owner&amp;nbsp;=&amp;nbsp;string.Format("SetAsposeVersions.{0}",&amp;nbsp;LibraryName);&lt;br /&gt;mod.Sequence&amp;nbsp;=&amp;nbsp;0;&lt;br /&gt;mod.Type&amp;nbsp;=&amp;nbsp;SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;&lt;br /&gt;&lt;br /&gt;webApp.WebConfigModifications.Add(mod);&lt;br /&gt;webApp.Update();&lt;br /&gt;SPFarm.Local.Services.GetValue&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;SPWebService&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;().ApplyWebConfigModifications();&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-997690999074819033?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/997690999074819033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=997690999074819033' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/997690999074819033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/997690999074819033'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/01/adding-bindingredirect-to-webconfig.html' title='Adding a BindingRedirect to Web.Config Using SPWebConfigModification'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-5088665396039732710</id><published>2008-01-10T13:20:00.001-08:00</published><updated>2008-01-10T15:23:58.731-08:00</updated><title type='text'>Finding and Removing a Rogue SharePoint Web Config Modification</title><content type='html'>During development of a small tool to enable binding redirection of .net libraries referenced in a SharePoint site, I found that ApplyWebConfigModifications() calls to the SPWebService were failing due to an existing SPWebConfigModification. The existing modification was atempting to access a path that does not exist in the web.config file.&lt;br /&gt;&lt;br /&gt;To find the modification that is failing, I added a breakpoint and  whilst debugging opened the following statement in QuickWatch in Visual Studio:&lt;br /&gt;&lt;br /&gt;SPFarm.Local.Services.GetValue&amp;lt;SPWebservice&amp;gt;()&lt;br /&gt;&lt;br /&gt;Then I navigated through the following properties in the Quick Watch window:&lt;br /&gt;WebApplications/base/base/Non-Public members/BackingList&lt;br /&gt;&lt;br /&gt;This offers access to all the web applications on the farm. For each web application under that node, open the WebConfigModifications node and check each one for the path that is reported to be failing. Then you can delete that faulty WebCofigModification using the following code:&lt;br /&gt;&lt;br /&gt; &lt;div class='code'&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color='blue'&gt;foreach&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(SPWebApplication&amp;nbsp;thisApp&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;in&amp;nbsp;&lt;/font&gt;SPFarm.Local.Services.GetValue&amp;lt;SPWebService&amp;gt;().WebApplications)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;font color='blue'&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;for&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(&lt;/font&gt;&lt;font color='blue'&gt;int&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;thisApp.WebConfigModifications.Count&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;font color='maroon'&gt;0&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;i--)&lt;br /&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;{&lt;br /&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;SPWebConfigModification&amp;nbsp;mod&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;thisApp.WebConfigModifications[i&amp;nbsp;-&amp;nbsp;&lt;/font&gt;&lt;font color='maroon'&gt;1&lt;/font&gt;&lt;font color='black'&gt;]&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;if&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(mod.Path.ToLower().Contains(&lt;/font&gt;&lt;font color='#808080'&gt;"[TEXT&amp;nbsp;IN&amp;nbsp;BAD&amp;nbsp;PATH]"&lt;/font&gt;&lt;font color='black'&gt;))&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;thisApp.WebConfigModifications.Remove(mod)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&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;thisApp.Update()&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;/font&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;By deleting the faulty modification from the collection, the ApplyWebConfigModifications() call will now run to completion without raising an exception.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-5088665396039732710?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/5088665396039732710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=5088665396039732710' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5088665396039732710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5088665396039732710'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2008/01/finding-and-removing-rogue-sharepoint.html' title='Finding and Removing a Rogue SharePoint Web Config Modification'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-5735444523590447064</id><published>2007-12-20T22:12:00.000-08:00</published><updated>2007-12-20T22:24:45.746-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>A Tool to Help with CAS Policies</title><content type='html'>When adding Code Access Security policies to a manifest file in a SharePoint feature, determining which permissions to apply can be a hit and miss affair. Add some permissions, activate the feature and read the SecurityException to get an idea of what else is needed.&lt;br /&gt;&lt;br /&gt;But help is already on your development machine, in the guise of PERMCALC (official known as the "Minimum Grant Set Determination tool"), a visual studio command line tool that is run from the Visual Studio Command window.&lt;br /&gt;&lt;br /&gt;This tool is run against one or more assemblies, and generates an XML file listing the "&lt;em&gt;estimated&lt;/em&gt;" permissions that must be granted to access that assembly. It attempts to trace all code paths through the named assembly, and through the libraries called by the assembly. So even if it doesn't give a comprehensive view, it can be a useful check before you start debugging those CAS issues.&lt;br /&gt;&lt;br /&gt;An &lt;a href="http://msdn2.microsoft.com/en-us/library/ms165077(VS.80).aspx"&gt;overview of the tool&lt;/a&gt; is available on the Microsoft site..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-5735444523590447064?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/5735444523590447064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=5735444523590447064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5735444523590447064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5735444523590447064'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/12/tool-to-help-with-cas-policies.html' title='A Tool to Help with CAS Policies'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4556856717560727661</id><published>2007-12-11T22:07:00.000-08:00</published><updated>2007-12-11T22:10:04.380-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><title type='text'>SPSiteDataQuery Resources</title><content type='html'>Useful posts and articles:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.thekid.me.uk/archive/2007/02/27/spsitedataquery-samples-for-wss-v3.aspx"&gt;Samples for WSS3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;What works and what wont are highlighted by &lt;a href="http://www.sharepointblogs.com/michael/archive/2007/06/28/implementing-spsitedataquery-learning-by-doing.aspx"&gt;Michael Hofer&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4556856717560727661?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4556856717560727661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4556856717560727661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4556856717560727661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4556856717560727661'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/12/spsitedataquery-resources.html' title='SPSiteDataQuery Resources'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-3344232361304664</id><published>2007-12-11T20:19:00.000-08:00</published><updated>2007-12-11T20:26:38.866-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='web parts'/><title type='text'>SPGridView Requests FileIOPermission When Added to a Web Part</title><content type='html'>I have been struggling with the SPGridView causing a security exception in a custom web part. Exploring the code with reflector reveals that when the SPGridView loads it tries to register a JavaScript file from the Templates\layouts folder in the 12 hive, and this process involves a call to the MakeBrowserCacheSafeLayoutsUrl method. That method attempts to create a unique file name for the JavaScript file. This requires that the JavaScript file is opened and read, therefore needing FileIOPermissions. If the web part is not explicitly being granted FileIOPermission in CAS, then the rendering fails.&lt;br /&gt;&lt;br /&gt;I added the following to the manifest file that configures the CAS settings for my custom web part:&lt;br /&gt;&lt;br /&gt;&amp;lt;ipermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" read="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12;$AppDir$" write="$AppDir$" append="$AppDir$" pathdiscovery="$AppDir$"&gt;&lt;br /&gt;&lt;br /&gt;Must admit to not being happy with hard-coding the path, but it got the web part working!&lt;br /&gt;&lt;br /&gt;If you are wondering about the $AppDir$ parameter, I quote "it refers to the initial folder the application points to, and any subfolders". Not sure what these are for SharePoint - I tried using just $AppDir$ for the Read attribute but that did not supply the necessary access in this case (hence the hard-coded path).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-3344232361304664?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/3344232361304664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=3344232361304664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3344232361304664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3344232361304664'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/12/spgridview-requests-fileiopermission.html' title='SPGridView Requests FileIOPermission When Added to a Web Part'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6610123341487349563</id><published>2007-12-06T19:04:00.000-08:00</published><updated>2007-12-06T19:23:15.683-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><category scheme='http://www.blogger.com/atom/ns#' term='web parts'/><title type='text'>Displaying Google Search Results in the MOSS Search Center</title><content type='html'>I thought of a couple of possibilities to meet this requirement, but the only approach I could get to work satisfactorily in a short space of time was to embed a call to the Google AJAX Search API inside a content editor web part.&lt;br /&gt;&lt;br /&gt;To achieve this, first you need a Google Search API Key which you can get from a &lt;a href="http://code.google.com/apis/ajaxsearch/signup.html"&gt;sign up&lt;/a&gt; form on the Google Code site. The process creates a key that will work against a specific server URL; surprisingly, the correct key actually permits the search to work from an intranet site, not just from public-facing sites. The page displaying your key also includes some starter code to show how to use that key - nice work, Google!&lt;br /&gt;&lt;br /&gt;I modified this code somewhat to restrict search results to New Zealand sites only by applying the following restriction to each Searcher object:&lt;br /&gt;&lt;br /&gt;searcher.setSiteRestriction("co.nz");&lt;br /&gt;&lt;br /&gt;Had hoped for a more generic way of restricting the search to a country, but that's all I have found so far.&lt;br /&gt;&lt;br /&gt;Then the JavaScript code, including references to the search css file "gsearch.css" and to the API launcher, was pasted into a Content Editor control on the search results page in the search center. One addition was a querystring parsing method in JavaScript to read the search term from the "k" querystring parameter in the URL for the search results page, and to use that text in the SearchControl execute call.&lt;br /&gt;&lt;br /&gt;Certainly not as flexible or simple a process as that explained by Arpan Shah in his &lt;a href="http://blogs.msdn.com/arpans/archive/2007/07/27/sharepoint-data-view-part-magic-and-search.aspx"&gt;blog post&lt;/a&gt; about rendering Microsoft Live search results in SharePoint, but a good starting point to fulfill the client's requirements.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6610123341487349563?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6610123341487349563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6610123341487349563' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6610123341487349563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6610123341487349563'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/12/displaying-google-search-results-in.html' title='Displaying Google Search Results in the MOSS Search Center'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-307924983782362312</id><published>2007-12-04T16:06:00.000-08:00</published><updated>2007-12-04T18:07:58.974-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Debugging SharePoint Timer Jobs</title><content type='html'>I am sure it has been written about elsewhere, but here is the way in which I have been debugging timer jobs.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Add the PDB File to the GAC&lt;/strong&gt;&lt;br /&gt;The PDB file needs to be in the GAC for debugging in Visual Studio. You can add this file through a feature manifest file, but you are unlikely to want to deploy the PDB to the GAC on your production server, so a better way on the dev server is to directly place files in the GAC. To do this, map a drive in windows explorer to&lt;br /&gt;&lt;br /&gt;\\[your server name]\c$\windows\assembly&lt;br /&gt;&lt;br /&gt;This bypasses the windows explorer shell special handling for this folder, and allows you to copy and paste files as normal without using GACUTIL.&lt;br /&gt;&lt;br /&gt;In the GAC_MSIL subfolder, find the subfolder corresponding to the name of your assembly. Below there will be one or more version subfolders. Find the latests version subfolder., and copy your timer job dll and pdb file (built in debug mode!) to this folder.&lt;br /&gt;&lt;br /&gt;If this copy action is denied, open the Services administrative tool, and STOP the Windows SharePoint Services Timer service. Apply an IISRESET from the command line, and then attempt to copy the files again - resetting those two services should remove the lock on the dll. After copying the files, make sure to restart the SharePoint Timer service!&lt;br /&gt;&lt;br /&gt;I did have one occasion where the Timer Service "hung" whilst attempting to restart. I found that ending OWSTIMER in the Windows Task Manager cleared this hiccup.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Debugging In Visual Studio&lt;/strong&gt;&lt;br /&gt;Set a breakpoint in your timer job code, and then open the "Attach to Process" dialog from the Debug menu. Check the box at the bottom of the dialog titled "Show Processes from All User", and select OWSTIMER.EXE from the list of available processes. Click the Attach button.... and hopefully your breakpoint should display as a nice fat filled dot!&lt;br /&gt;&lt;br /&gt;An outlined breakpoint (an empty circle) rather than a filled breakpoint means VS cannot match your code against the running code, and so something in the above process has not worked for you. Worked for me, though! Perhaps you have copied your dll and PDB files to the wrong GAC subfolder?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Triggering the Job&lt;/strong&gt;&lt;br /&gt;Now you just need to trigger your timer job. One suggestion for this is to modify the schedule of the job to occur frequently - have a look at &lt;a href="http://blah.winsmarts.com/2007-6-Developer_tip_-_Testing_SharePoint_timer_jobs_in_a_development_environment.aspx"&gt;this post&lt;/a&gt; on blah!bLaH!BLOG!! for how to do that.&lt;br /&gt;&lt;br /&gt;I have a design pattern in place where the schedule for custom timer jobs are configured in a configuration list in the WSS site. When the feature containing the timer job is activated, a feature receiver reads the configuration data from the list and sets the timer job accordingly. Works nicely when you want to manipulate schedules and other data relating to the timer job.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;One Last Timer Job Tip...&lt;/strong&gt;&lt;br /&gt;If you need to persist data across executions of your timer job, &lt;a href="http://blogs.blackmarble.co.uk/blogs/jmann/archive/2007/10/18/persisting-state-in-sharepoint-timer-job-definitions.aspx"&gt;here's how&lt;/a&gt; from James Mann.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-307924983782362312?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/307924983782362312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=307924983782362312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/307924983782362312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/307924983782362312'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/12/debugging-sharepoint-timer-jobs.html' title='Debugging SharePoint Timer Jobs'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4302142810101226707</id><published>2007-11-28T22:29:00.000-08:00</published><updated>2007-11-28T22:35:31.480-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='list view'/><title type='text'>Filtering a SharePoint View from the QueryString</title><content type='html'>Clever little tip from Aggarwal Saurabh - you can filter the contents of a SharePoint list view by appending a couple of querystring values to the address.&lt;br /&gt;&lt;br /&gt;For example, if you have a list view including a field named "ProductID", you can filter a preset list view to only show items for a Products with ID "123" by adding the following querystring to the page URL:&lt;br /&gt;&lt;br /&gt;     ?FilterField1=ProductID&amp;amp;FilterValue1=123&lt;br /&gt;&lt;br /&gt;Could be handy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4302142810101226707?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4302142810101226707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4302142810101226707' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4302142810101226707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4302142810101226707'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/11/filtering-sharepoint-view-from.html' title='Filtering a SharePoint View from the QueryString'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-5019717200841834334</id><published>2007-11-06T00:19:00.000-08:00</published><updated>2007-11-06T00:32:40.734-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><title type='text'>Why does my modal dialog box open another browser on submit?</title><content type='html'>Currently I am creating an application where a modal dialog box opens when the NewForm.aspx page for a WSS list is opened, to search against an external data source and pass the results back to the form (I'll let you know if this proves to be a viable design pattern!).&lt;br /&gt;&lt;br /&gt;The default behaviour of the modal dialog has been driving me a little crazy - when the form in the ASP.Net page in the modal dialog box is submitted by clicking on a button in that page, that same form was opening in a new browser window. The dialog was also remaining open.&lt;br /&gt;&lt;br /&gt;Finally came across the solution tucked away in a forum answer by Ken Dopierala Jr. His tip:&lt;br /&gt;&lt;br /&gt; &lt;em&gt;Remember, when you post back to a Modal page you must put: &amp;lt;base target="_self"&amp;gt; in the &amp;lt;head&amp;gt; section of the HTML on that page.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;And that is all it needed to take the nastiness away, just adding that simple tag into the PlaceHolderAdditionalPageHead placeholder of the WSS page being presented in the dialog. Thanks, Ken!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-5019717200841834334?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/5019717200841834334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=5019717200841834334' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5019717200841834334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5019717200841834334'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/11/why-does-my-modal-dialog-box-open.html' title='Why does my modal dialog box open another browser on submit?'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2067573455449909331</id><published>2007-10-27T20:49:00.000-07:00</published><updated>2007-10-27T21:02:06.579-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='web parts'/><title type='text'>Creating a new form in a list by copying an existing form (in code)</title><content type='html'>To copy an existing form in a WSS list, and to add a new content editor web part to that list, use the SPFile class (not the SPForm collection of the list):&lt;br /&gt;&lt;br /&gt;      //Copy the NewForm.aspx to NewForm_new.aspx&lt;br /&gt;      string formPath = "Lists/ClientTest/NewForm.aspx";&lt;br /&gt;      string newformPath = formPath.Replace(".aspx", "_new.aspx");             &lt;br /&gt;      SPFile form = web.GetFile(formPath);&lt;br /&gt;      form.CopyTo(newformPath, false);&lt;br /&gt;&lt;br /&gt;      //Get a reference to the new form, and create a new content editor web part containing onload JavaScript&lt;br /&gt;      SPFile copiedForm = web.GetFile(newformPath);&lt;br /&gt;      SPLimitedWebPartManager wpManager = copiedForm.GetLimitedWebPartManager(PersonalizationScope.Shared);&lt;br /&gt;     &lt;br /&gt;      //Create the new web part&lt;br /&gt;      ContentEditorWebPart wpContent = new ContentEditorWebPart();&lt;br /&gt;      XmlDocument xmlContent = new XmlDocument();             &lt;br /&gt;      XmlElement el = xmlContent.CreateElement("El");             &lt;br /&gt;      el.InnerText = "&lt;script type="'text/javascript'" language="'javascript'" for="'window'" event="'onload'"&gt;alert('Hi from the page onload event!');&lt;/script&gt;";&lt;br /&gt;      wpContent.Content = el;             &lt;br /&gt;      wpManager.AddWebPart(wpContent, "Main", 0);&lt;br /&gt;&lt;br /&gt;The JavaScript adds an onload handler to the page, allowing for behaviours to modify the content of the standard list form for example.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2067573455449909331?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2067573455449909331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2067573455449909331' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2067573455449909331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2067573455449909331'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/10/creating-new-form-in-list-by-copying.html' title='Creating a new form in a list by copying an existing form (in code)'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-3021702507877400187</id><published>2007-10-18T19:43:00.000-07:00</published><updated>2007-10-18T19:48:50.852-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Error in Custom Document Library View</title><content type='html'>When creating custom document library definitions using the view files output by the SharePoint Solution Generator, you may see the following error on the custom view pages in an instance of the libary:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;An error occurred during the processing of ....... Only Content controls are allowed in a content page that contains Content controls.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is caused by invalid text in the ASPX file - the solution generator adds a comment XML node to the top of each view file, and this needs to be deleted before deploying that view.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-3021702507877400187?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/3021702507877400187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=3021702507877400187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3021702507877400187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3021702507877400187'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/10/error-in-custom-document-library-view.html' title='Error in Custom Document Library View'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2094515058039496277</id><published>2007-10-18T19:22:00.000-07:00</published><updated>2007-10-18T19:42:47.732-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='features'/><title type='text'>Checkin Page Shows Error For Document Library</title><content type='html'>Have been very busy creating lots of solutions to define a raft of lists and document libraries. One technique I have experimented with is as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Manually define the site containing the lists&lt;/li&gt;&lt;li&gt;Use the SharePoint Solution Generator to create schemas for the lists&lt;/li&gt;&lt;li&gt;Run my own tool across these schemas to generate site column and content type definitions. The tool also removes some of the invlaid attributes in the schema field definitions that are created by the solution generator (I'll publish the tool here sometime soon)&lt;/li&gt;&lt;li&gt;Create solutions and features in Visual Studio using these XML definitions.&lt;/li&gt;&lt;/ul&gt;This has been saving me lots of manual effort in creating all the necessary XML. My reason for not using the VSeWSS projects for list definitions is I prefer control over the feature and manifest files, so that I can add other elements where necessary.&lt;br /&gt;&lt;br /&gt;I came across an issue with a document library created using one of the custom list definitions. Everything seemd to work in the document library except for checking in a document - the checkin.aspx page simply displayed an error stating&lt;br /&gt;&lt;br /&gt;  &lt;span style="color:#cc0000;"&gt;"Value does not fall within the expected range"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Don't ya love that one!! Lots of investigation uncovered the cause - a malformed content type. The document library used one custom content type, and one of the field elements in the field section of the document library schema.xml file had a mispelt name attribute. Amazing that I could still add a document, and could edit the metadata values!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2094515058039496277?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2094515058039496277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2094515058039496277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2094515058039496277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2094515058039496277'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/10/checkin-page-shows-error-for-document.html' title='Checkin Page Shows Error For Document Library'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-9140682910746199795</id><published>2007-08-30T21:47:00.000-07:00</published><updated>2007-08-30T21:50:12.075-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>Visio Stencil of SharePoint Design Shapes</title><content type='html'>When creating site and application designs for SharePoint, I have wanted to illustrate the elements that comprise the solution's architecture.&lt;br /&gt;&lt;br /&gt;Diagrams at this level are very valuable for explaining the proposed design to a client, and also for summarising the elements involved ("a picture is worth....").&lt;br /&gt;&lt;br /&gt;So I have created a Visio stencil containing a few useful shapes.&lt;br /&gt;&lt;br /&gt;See an example of the shapes, and download the stencil, from &lt;a href="http://www.smallsteps.co.nz/articles/VisioStencil.aspx"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-9140682910746199795?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/9140682910746199795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=9140682910746199795' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/9140682910746199795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/9140682910746199795'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/08/visio-stencil-of-sharepoint-design.html' title='Visio Stencil of SharePoint Design Shapes'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7137093846314376517</id><published>2007-08-22T13:45:00.000-07:00</published><updated>2007-08-22T13:54:18.995-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Debugging SharePoint Custom Code</title><content type='html'>&lt;a href="http://blog.thekid.me.uk/archive/2007/07/25/debugging-tips-for-sharepoint-and-wss-exceptions.aspx?id=85"&gt;Great article&lt;/a&gt; about debugging SharePoint applications. It also suggests designing code to facilitate debugging, which seems a very sensible idea to me (particularly when combined with the idea of designing to "fail fast", thereby ensuring that exceptions are not hidden by the code)&lt;br /&gt;&lt;br /&gt;One MOSS site I developed recently includes several event handlers and timer jobs. Each of these includes a common class to write error messages to a custom list in the site when exceptions occur. Having a central location within the site to monitor error message has proven effective - one advantage is that I can set up alerts in case of exceptions.&lt;br /&gt;&lt;br /&gt;Using the facilities native to SharePoint (liist, alerts, etc) simplifies development and gives huge flexibility in using the resulting data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7137093846314376517?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7137093846314376517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7137093846314376517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7137093846314376517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7137093846314376517'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/08/debugging-sharepoint-custom-code.html' title='Debugging SharePoint Custom Code'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-2701002819429050614</id><published>2007-08-08T21:33:00.000-07:00</published><updated>2007-08-08T22:01:12.981-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>Email and SharePoint are not Competitors</title><content type='html'>A discussion following on from a presentation I recently attended (on the use of SharePoint in business) raised the opinion that email is a competitor to SharePoint in terms of business use. The basis of the argument was that people in an organisation &lt;strong&gt;either&lt;/strong&gt; can use SharePoint for their collaboration &lt;strong&gt;or&lt;/strong&gt; they can use email.&lt;br /&gt;&lt;br /&gt;I disagree. SharePoint is now very much email-enabled, with the ability to send alerts or emails from custom code, and to receive emails into lists. The ideas in the discussion may have been based on the belief that users are required to interact with the data contained in a SharePoint site only through the site's web pages.&lt;br /&gt;&lt;br /&gt;Certainly the users will need to perform some actions through web pages, but it is possible without much work at all to implement a business process in SharePoint in such a way that the users can continue to use emails for many of the operations they perform. An email sent to a SharePoint list can be interpreted by event handlers on the list, which could act on information in the email and add or edit data in the list.&lt;br /&gt;&lt;br /&gt;What I have found is that architecting solutions in SharePoint requires a different vision than when developing in ASP.Net. One of the key points is to build on SharePoint's strengths - think about using lists for storing data (for example, store temporary data for an application in a list rather than in a database table).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-2701002819429050614?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/2701002819429050614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=2701002819429050614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2701002819429050614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/2701002819429050614'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/08/email-and-sharepoint-are-not.html' title='Email and SharePoint are not Competitors'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4963064675040692795</id><published>2007-08-08T21:02:00.000-07:00</published><updated>2007-08-08T21:32:06.823-07:00</updated><title type='text'>Strange Results When Adding Web.Config Values</title><content type='html'>SharePoint provides a programmatic way of editing existing values and adding new values to a web application's web.config file - through the use of the SPWebConfigModification class (defined in the Microsoft.SharePoint.Adminstration namespace).&lt;br /&gt;&lt;br /&gt;There are plenty of posts around explaining how to use this class, the basic pattern for adding a custom value being the following:&lt;br /&gt; &lt;div class='code'&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color='blue'&gt;private&amp;nbsp;void&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;AddWebConfigEntry(&lt;/font&gt;&lt;br /&gt;&lt;font color='blue'&gt;string&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;keyName,&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;string&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;entryValue)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&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;SPWebConfigModification&amp;nbsp;modification&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;new&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;SPWebConfigModification&lt;/font&gt;&lt;br /&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;&amp;nbsp;(&lt;font color='blue'&gt;string&lt;/font&gt;&lt;font color='black'&gt;.Format(&lt;/font&gt;&lt;font color='#808080'&gt;"add[@key=\"{0}\"]"&lt;/font&gt;&lt;font color='black'&gt;,&amp;nbsp;keyName)&lt;br /&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;&amp;nbsp;,&amp;nbsp;&lt;/font&gt;&lt;font color='#808080'&gt;"configuration/appSettings"&lt;/font&gt;&lt;font color='black'&gt;)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&lt;/font&gt;&lt;font color='black'&gt;modification.Owner&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;Constants.FEATURE_NAME&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&lt;/font&gt;&lt;font color='black'&gt;modification.Sequence&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='maroon'&gt;0&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&lt;/font&gt;&lt;font color='black'&gt;modification.Type&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&lt;/font&gt;&lt;font color='black'&gt;modification.Value&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;entryValue&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&lt;/font&gt;&lt;font color='black'&gt;_webApp.WebConfigModifications.Add(modification)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&lt;/font&gt;&lt;font color='black'&gt;_webApp.Update()&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;/font&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;Wen I first wrote and used this function, I found that the key was correctly added to the web.config file, but was not being removed by a similar deletion function I wrote. And everytime I called this AddWebConfigEntry function, a duplicate entry was written to the file. &lt;br /&gt;&lt;br /&gt;Turned out that I had missed the escaped double quotes in the first argument of the SPWebConfigModification constructor call. What made this a tricky effect to fault-find was the fact that the new web.config entry was being created. &lt;br /&gt;&lt;br /&gt;So the morale of this tale is - be VERY careful with the arguments to that constructor!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4963064675040692795?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4963064675040692795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4963064675040692795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4963064675040692795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4963064675040692795'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/08/strange-results-when-adding-webconfig.html' title='Strange Results When Adding Web.Config Values'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6141070086069509304</id><published>2007-07-17T14:54:00.000-07:00</published><updated>2011-09-29T16:05:47.138-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>Internet Explorer Default XSL</title><content type='html'>To view the default XSL used by IE, browse to &lt;a href="res://msxml.dll/DEFAULTSS.xsl"&gt;res://msxml.dll/DEFAULTSS.xsl&lt;/a&gt; in Interner Explorer. This works in versions of IE prior to IE9 - I have not found an equivalent for IE9&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-pfpQ0ejjblM/ToT5vLcpzSI/AAAAAAAAADQ/Y9XyD4zqEuc/s1600/IE8DefaultXSL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="163" src="http://3.bp.blogspot.com/-pfpQ0ejjblM/ToT5vLcpzSI/AAAAAAAAADQ/Y9XyD4zqEuc/s320/IE8DefaultXSL.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6141070086069509304?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6141070086069509304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6141070086069509304' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6141070086069509304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6141070086069509304'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/07/internet-explorer-default-xsl.html' title='Internet Explorer Default XSL'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-pfpQ0ejjblM/ToT5vLcpzSI/AAAAAAAAADQ/Y9XyD4zqEuc/s72-c/IE8DefaultXSL.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-3704890281701872476</id><published>2007-07-09T02:36:00.000-07:00</published><updated>2007-07-09T02:46:24.118-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><title type='text'>MOSS Install - Tips from an MS Field Engineer</title><content type='html'>Tips from a Microsoft premier field engineer on how to achieve a "&lt;em&gt;... less painful experience ...&lt;/em&gt;" when faced with a MOSS install - &lt;a href="http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?ID=9"&gt;http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?ID=9&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(and &lt;a href="http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?ID=8"&gt;here's&lt;/a&gt; another useful post on configuring Alternate Access Mappings)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-3704890281701872476?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/3704890281701872476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=3704890281701872476' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3704890281701872476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3704890281701872476'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/07/moss-install-tips-from-ms-field.html' title='MOSS Install - Tips from an MS Field Engineer'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-1256444479722172807</id><published>2007-07-08T20:46:00.000-07:00</published><updated>2007-07-08T20:52:33.663-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><title type='text'>Calling a Custom Javascript Function on Page Load</title><content type='html'>A simple way to add a custom Javascript function to the list of scripts that run at page load is as follows:&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;    _spBodyOnLoadFunctionNames.push("YourFunctionName");&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-1256444479722172807?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/1256444479722172807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=1256444479722172807' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1256444479722172807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1256444479722172807'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/07/calling-custom-javascript-function-on.html' title='Calling a Custom Javascript Function on Page Load'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-8227803455106710007</id><published>2007-07-05T19:05:00.000-07:00</published><updated>2007-07-05T19:28:38.436-07:00</updated><title type='text'>Displaying Site Data in a SharePoint Page</title><content type='html'>To display the name of the current site in a master page or page layout within SharePoint, add the following control to the source of the page:&lt;br /&gt;&lt;br /&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;SharePointWebControls:ProjectProperty&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;Property&lt;/font&gt;&lt;font color='blue'&gt;="Title"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;runat&lt;/font&gt;&lt;font color='blue'&gt;="server"/&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;This display the title of the site. The ProjectProperty SharePoint Web Control is useful for displaying properties of the current web site. Other fields such as the site description can also be displayed this way&lt;br /&gt;&lt;br /&gt;Note that Microsoft must have used the name "project" at some stage for a SharePoint site, given the name of this control and also the name of the site Title and Description settings page (which is &lt;em&gt;prjseng.aspx&lt;/em&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-8227803455106710007?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/8227803455106710007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=8227803455106710007' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8227803455106710007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8227803455106710007'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/07/displaying-site-data-in-sharepoint-page.html' title='Displaying Site Data in a SharePoint Page'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-7888046485304154440</id><published>2007-07-05T14:37:00.000-07:00</published><updated>2007-07-05T14:45:50.832-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='wcm'/><title type='text'>Adding a CSS File Link to a MasterPage</title><content type='html'>Use the following to add a reference to a stylesheet in a WCM publishing site's Style Library document library:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;SharePointWebControls:CssRegistration&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;ID&lt;/font&gt;&lt;font color='blue'&gt;="CssRegistration1"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name&lt;/font&gt;&lt;font color='blue'&gt;="&amp;lt;%&amp;nbsp;$SPUrl:~sitecollection/Style&amp;nbsp;Library/style.css&amp;nbsp;%&amp;gt;"&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color='red'&gt;&amp;nbsp;runat&lt;/font&gt;&lt;font color='blue'&gt;="server"/&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Note that some of the default styles may still override those in the referenced stylesheet, so you may need to add the CSS as the &lt;em&gt;Alternative CSS URL&lt;/em&gt; on the "Site Master Page Settings" form&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-7888046485304154440?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/7888046485304154440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=7888046485304154440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7888046485304154440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/7888046485304154440'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/07/adding-css-file-link-to-masterpage.html' title='Adding a CSS File Link to a MasterPage'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-3379426324879527146</id><published>2007-07-04T19:45:00.000-07:00</published><updated>2007-07-04T20:32:22.488-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='wcm'/><title type='text'>Field Controls in a Layout Page not Displayed in Edit Mode</title><content type='html'>I was creating a new page layout associated with a content type that I had just modified (removed some fields and added others). SharePoint Designer showed the edit controls ocrrectly in the layout page.&lt;br /&gt;&lt;br /&gt;But when I went to create a new page in the site using this page layout, only some of the field edit controls were displayed on the new page. No errors were displayed on the page, it was just failing to display some of the controls.&lt;br /&gt;&lt;br /&gt;Tracked this is to the content types associated with the pages document library. Document libraries keep local copies of content types, so the pages library was storing the old set of fields for the content type I had changed. An important proviso here is that the custom content type that caused the problems is being modified through a feature rather than manually in the site settings pages. Perhaps if I had modified the content type directly rather than through a feature then the changes would have been propagated to the local copy of the content type in the document library?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-3379426324879527146?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/3379426324879527146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=3379426324879527146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3379426324879527146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3379426324879527146'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/07/field-controls-in-layout-page-not.html' title='Field Controls in a Layout Page not Displayed in Edit Mode'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-5452881283382946685</id><published>2007-07-03T14:55:00.000-07:00</published><updated>2007-07-03T15:03:15.111-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Removing User Permissions From a List Item</title><content type='html'>Programmatically modifying the item-level permissions in a list involves manipulation of the Role Assignments collection for that item.&lt;br /&gt;&lt;br /&gt;This example shows how to remove a specific role definition from each of the members of a user collection:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color='darkgreen'&gt;///&amp;nbsp;&amp;lt;summary&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;Remove&amp;nbsp;a&amp;nbsp;role&amp;nbsp;definition&amp;nbsp;from&amp;nbsp;each&amp;nbsp;of&amp;nbsp;the&amp;nbsp;members&amp;nbsp;of&amp;nbsp;a&amp;nbsp;user&amp;nbsp;collection&amp;nbsp;for a list item&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;&amp;lt;/summary&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;&amp;lt;param&amp;nbsp;name="item"&amp;gt;The&amp;nbsp;List&amp;nbsp;Item&amp;lt;/param&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;&amp;lt;param&amp;nbsp;name="userVals"&amp;gt;The&amp;nbsp;collection&amp;nbsp;of&amp;nbsp;users&amp;nbsp;who&amp;nbsp;are&amp;nbsp;to&amp;nbsp;have&amp;nbsp;the&amp;nbsp;role&amp;nbsp;definition&amp;nbsp;removed&amp;lt;/param&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;///&amp;nbsp;&amp;lt;param&amp;nbsp;name="def"&amp;gt;The&amp;nbsp;role&amp;nbsp;definition&amp;nbsp;to&amp;nbsp;remove&amp;lt;/param&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;internal&amp;nbsp;static&amp;nbsp;void&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;RemoveRoleDefinitionFromUsers(SPListItem&amp;nbsp;item,&amp;nbsp;SPFieldUserValueCollection&amp;nbsp;userVals,&amp;nbsp;SPRoleDefinition&amp;nbsp;def)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&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;&lt;/font&gt;&lt;font color='blue'&gt;if&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(userVals&amp;nbsp;!&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;null&lt;/font&gt;&lt;font color='black'&gt;)&lt;br /&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;{&lt;br /&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;/font&gt;&lt;font color='blue'&gt;foreach&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(SPFieldUserValue&amp;nbsp;userVal&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;in&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;userVals)&lt;br /&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;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPUser&amp;nbsp;user&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;userVal.User&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;SPRoleAssignment&amp;nbsp;role&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;item.RoleAssignments.GetAssignmentByPrincipal((SPPrincipal)user)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(role&amp;nbsp;!&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;null&lt;/font&gt;&lt;font color='black'&gt;)&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;if&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(role.RoleDefinitionBindings.Contains(def))&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;role.RoleDefinitionBindings.Remove(def)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&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;/font&gt;&lt;font color='black'&gt;role.Update()&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&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;/font&gt;&lt;font color='black'&gt;item.SystemUpdate(&lt;/font&gt;&lt;font color='blue'&gt;false&lt;/font&gt;&lt;font color='black'&gt;)&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&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;br /&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;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-5452881283382946685?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/5452881283382946685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=5452881283382946685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5452881283382946685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/5452881283382946685'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/07/removing-user-permissions-from-list.html' title='Removing User Permissions From a List Item'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4074893799588514840</id><published>2007-06-28T21:10:00.000-07:00</published><updated>2007-06-28T21:26:13.932-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Dependencies in Custom SharePoint Permissions</title><content type='html'>An event handler I have written applies item-level permissions to modified list items - specific users are granted custom permissions.&lt;br /&gt;&lt;br /&gt;This was working fine until I enabled versioning on the list manipulated by the handler. After making that change I noticed that the specific users were now seeing the access denied page in SharePoint when attempting to view items with the managed permissions.&lt;br /&gt;&lt;br /&gt;The code was assigning SPBasePermissions.EditListItems and SPBasePermissions.ViewListItems rights for the users. After experimenting in the Edit Permissions Level administrative page in the site settings, I noticed that checking certain boxes caused other boxes to be checked - there are clearly some dependencies behind the scenes that should be applied when assigning custom permissions.&lt;br /&gt;&lt;br /&gt;The outcome of the experimenting was that with versioning enabled on the list, the view versions permissions was required.  Edit rights on an item will be granted to a user by applying the following set of SPBasePermissions to the role definition:&lt;br /&gt;&lt;br /&gt;SPBasePermissions.EditListItems  SPBasePermissions.ViewListItems  SPBasePermissions.OpenItems  SPBasePermissions.ViewVersions  SPBasePermissions.ViewPages  SPBasePermissions.Open&lt;br /&gt;&lt;br /&gt;Viewing rights are granted with the same set, minus the EditListItems member.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4074893799588514840?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4074893799588514840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4074893799588514840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4074893799588514840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4074893799588514840'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/06/dependencies-in-custom-sharepoint.html' title='Dependencies in Custom SharePoint Permissions'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6745983764887555747</id><published>2007-06-27T00:40:00.001-07:00</published><updated>2007-06-27T00:40:56.614-07:00</updated><title type='text'>List of HTML Entities</title><content type='html'>Comprehensive list of HTML entities available at &lt;a href="http://www.w3schools.com/tags/ref_entities.asp"&gt;http://www.w3schools.com/tags/ref_entities.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6745983764887555747?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6745983764887555747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6745983764887555747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6745983764887555747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6745983764887555747'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/06/list-of-html-entities.html' title='List of HTML Entities'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-8322369979012325915</id><published>2007-06-26T21:45:00.000-07:00</published><updated>2008-12-09T09:06:46.791-08:00</updated><title type='text'>How to Display the "New" icon against a List Item</title><content type='html'>To show the standard &lt;img id="BLOGGER_PHOTO_ID_5080601233288253922" alt="SharePoint New standard icon" src="http://1.bp.blogspot.com/_uULWazB2biQ/RoHr50uO0eI/AAAAAAAAAAk/pYPS4gqC1fs/s320/new.gif" /&gt; SharePoint icon against new list items in a data view web part (or other XSLT web parts), use the following snippet:&lt;br /&gt;&lt;br /&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;xsl:if&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;test&lt;/font&gt;&lt;font color='blue'&gt;="ddwrt:IfNew(string(@Created))"&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;img&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;src&lt;/font&gt;&lt;font color='blue'&gt;="/_layouts/1033/images/new.gif"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;alt&lt;/font&gt;&lt;font color='blue'&gt;="New"&lt;/font&gt;&amp;nbsp;&lt;font color='blue'&gt;/&gt;&lt;br /&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;xsl:if&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-8322369979012325915?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/8322369979012325915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=8322369979012325915' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8322369979012325915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/8322369979012325915'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/06/how-to-display-new-icon-against-list.html' title='How to Display the &quot;New&quot; icon against a List Item'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_uULWazB2biQ/RoHr50uO0eI/AAAAAAAAAAk/pYPS4gqC1fs/s72-c/new.gif' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-501465287697548542</id><published>2007-06-26T19:40:00.000-07:00</published><updated>2007-06-26T19:47:54.192-07:00</updated><title type='text'>Comparing Dates in SharePoint XSL</title><content type='html'>Here's a way to peform a date comparison in the XSLT definition of a data view web part:&lt;br /&gt;&lt;br /&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;xsl:if&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;test&lt;/font&gt;&lt;font color='blue'&gt;="number(translate(substring-before(ddwrt:FormatDate(@Date_x0020_Raised&amp;nbsp;,1053&amp;nbsp;,5),&amp;nbsp;'&amp;nbsp;'),&amp;nbsp;'-',&amp;nbsp;''))+2&amp;nbsp;&amp;lt;&amp;nbsp;number(translate(substring-before(ddwrt:TodayIso(),&amp;nbsp;'T'),&amp;nbsp;'-',&amp;nbsp;''))"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;img&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;src&lt;/font&gt;&lt;font color='blue'&gt;="_layouts/images/ewr210s.gif"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;/&gt;&lt;br /&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;xsl:if&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This compares the date in the "Date Raised" field with the current date, and if the "Date Raised" is more than 2 days ago then an image is displayed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-501465287697548542?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/501465287697548542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=501465287697548542' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/501465287697548542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/501465287697548542'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/06/comparing-dates-in-sharepoint-xsl.html' title='Comparing Dates in SharePoint XSL'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-1687466314442325279</id><published>2007-06-25T16:19:00.000-07:00</published><updated>2007-06-25T16:23:18.771-07:00</updated><title type='text'>Handling Multivalue and Multiselect Field Values in SharePoint</title><content type='html'>Having written my own regular expression to parse the values from a multiselect lookup field, I then found a &lt;a href="http://blogs.msdn.com/markarend/archive/2007/05/29/parsing-multi-value-fields-multichoice-lookup-user-url-rules-for-the-delimiter.aspx"&gt;post&lt;/a&gt; from Mark Arend that offers regular expressions for all the various "decorated" field types in SharePoint (choices, lookup, Person or Group and Hyperlink fields). Very handy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-1687466314442325279?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/1687466314442325279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=1687466314442325279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1687466314442325279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1687466314442325279'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/06/handling-multivalue-and-multiselect.html' title='Handling Multivalue and Multiselect Field Values in SharePoint'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-1154151829492308572</id><published>2007-06-14T15:48:00.000-07:00</published><updated>2007-06-14T21:29:11.398-07:00</updated><title type='text'>Building an Accessible Internet Site with WCM: Setting Up the Solution</title><content type='html'>Latest project is to create an Internet site using MOSS that complies with accessibility web standards.&lt;br /&gt;&lt;br /&gt;First step was a LOT of research. I found plenty of useful articles by &lt;a href="http://heathersolomon.com/blog/articles/servermstpageforsitecollect_feature.aspx"&gt;Heather Solomon&lt;/a&gt;, &lt;a href="http://blogs.provoke.co.nz/Zac/Lists/Posts/Post.aspx?ID=5"&gt;Zac Smith&lt;/a&gt;, &lt;a href="http://cameronmoll.com/archives/2007/05/skinning_ms_sharepoint_with_st/"&gt;Cameron Moll&lt;/a&gt; and others, plus dashings of negative comments about quite how non-standard is the HTML pumped out by SharePoint. Sounds like a fair bit of work ahead!&lt;br /&gt;&lt;br /&gt;During my travels around the web, I came across a nice idea from Phil Wicklund on &lt;a href="http://mindsharpblogs.com/Phil/archive/2007/06/13/1874.aspx"&gt;managing SharePoint development across a team&lt;/a&gt;. The great thing about starting a new project is that it gives the opportunity to apply best practices, so I am combining Phil's approach of reproducing the 12 hive folder structure, but will be deploying via a feature rather than via Xcopy. The downside of this is that deployment during development is slower, but I prefer to always build the WSP file as this sorts out any deployment issues very early in the development cycle. Having a package deployable from the command-line is closer to allowing some form of continous integration, too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-1154151829492308572?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/1154151829492308572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=1154151829492308572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1154151829492308572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/1154151829492308572'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/06/building-accessible-internet-site-with.html' title='Building an Accessible Internet Site with WCM: Setting Up the Solution'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4886513694086655223</id><published>2007-06-12T21:47:00.000-07:00</published><updated>2007-06-12T22:21:00.793-07:00</updated><title type='text'>MOSS Internet Sites</title><content type='html'>I was preparing a list of MOSS public-facing web sites, but no point - 'cause &lt;a href="http://blogs.msdn.com/nay/pages/moss-based-internet-sites-live.aspx"&gt;here's&lt;/a&gt; a comprehensive list by &lt;a href="http://blogs.msdn.com/nay/default.aspx"&gt;Na-Young Kwon&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4886513694086655223?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4886513694086655223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4886513694086655223' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4886513694086655223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4886513694086655223'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/06/moss-internet-sites.html' title='MOSS Internet Sites'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-404585021815547483</id><published>2007-05-29T17:42:00.000-07:00</published><updated>2007-05-29T17:54:06.922-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='web parts'/><category scheme='http://www.blogger.com/atom/ns#' term='data view'/><title type='text'>Using Parameters in the SelectCommand of a Data View Web Part</title><content type='html'>The SelectCommand attribute of the SPDataSource element within a SharePoint DataView web part can use parameters supplied to the web part - and these parameters can come from a varity of sources, including the querystring in the page request.&lt;br /&gt;&lt;br /&gt;This opens the way to easily control the data displayed in the data view; for example, via an ID supplied in the querystring.&lt;br /&gt;&lt;br /&gt;The following code snippet shows some of the DataFormWebPart elements that use a value in the querystring to select a single list item to be displayed (the parameter is named &lt;b&gt;SelectedRisk&lt;/b&gt;). Notice how the parameter is referenced in the SelectCommand:&lt;br /&gt;&lt;br /&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;DataSources&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;SharePoint:SPDataSource&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;runat&lt;/font&gt;&lt;font color='blue'&gt;="server"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;SelectCommand&lt;/font&gt;&lt;font color='blue'&gt;="&amp;lt;View&amp;gt;&amp;lt;Query&amp;gt;&amp;lt;Where&amp;gt;&amp;lt;Eq&amp;gt;&amp;lt;FieldRef&amp;nbsp;Name=&amp;quot;ID&amp;quot;/&amp;gt;&amp;lt;Value&amp;nbsp;Type=&amp;quot;Counter&amp;quot;&amp;gt;&lt;b&gt;{SelectedRisk}&lt;/b&gt;&amp;lt;/Value&amp;gt;&amp;lt;/Eq&amp;gt;&amp;lt;/Where&amp;gt;&amp;lt;/Query&amp;gt;&amp;lt;/View&amp;gt;"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;...&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;SelectParameters&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&lt;br /&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;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;WebPartPages:DataFormParameter&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;PropertyName&lt;/font&gt;&lt;font color='blue'&gt;="ParameterValues"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;ParameterKey&lt;/font&gt;&lt;font color='blue'&gt;="&lt;b&gt;SelectedRisk&lt;/b&gt;"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;DefaultValue&lt;/font&gt;&lt;font color='blue'&gt;="0"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;Name&lt;/font&gt;&lt;font color='blue'&gt;="&lt;b&gt;SelectedRisk&lt;/b&gt;"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;WebPartPages:DataFormParameter&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;SelectParameters&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;SharePoint:SPDataSource&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;DataSources&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;ParameterBindings&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;ParameterBinding&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;Name&lt;/font&gt;&lt;font color='blue'&gt;="&lt;b&gt;SelectedRisk&lt;/b&gt;"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;Location&lt;/font&gt;&lt;font color='blue'&gt;="QueryString(ID)"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;DefaultValue&lt;/font&gt;&lt;font color='blue'&gt;="0"/&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;ParameterBindings&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-404585021815547483?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/404585021815547483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=404585021815547483' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/404585021815547483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/404585021815547483'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/05/using-parameters-in-selectcommand-of.html' title='Using Parameters in the SelectCommand of a Data View Web Part'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-4344509271775388665</id><published>2007-05-29T17:35:00.000-07:00</published><updated>2007-05-29T18:00:52.147-07:00</updated><title type='text'>Querying in CAML Relative to Today's Date</title><content type='html'>Found little information when searching for ways to perform date queries using CAML relative to today's date - only one reference to the use of OffsetDays from the article Customise the &lt;a href="http://msdn2.microsoft.com/en-us/library/aa981241.aspx"&gt;Content Query Web Part&lt;/a&gt; . Surprising the lack of information on this technique.&lt;br /&gt;&lt;br /&gt;Here's the example from that article:&lt;br /&gt;&lt;br /&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;Where&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;Gt&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;FieldRef&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;Name&lt;/font&gt;&lt;font color='blue'&gt;="Created"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;Nullable&lt;/font&gt;&lt;font color='blue'&gt;="True"&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;Type&lt;/font&gt;&lt;font color='blue'&gt;="DateTime"/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;Value&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;Type&lt;/font&gt;&lt;font color='blue'&gt;="DateTime"&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;&lt;/font&gt;&lt;font color='maroon'&gt;Today&lt;/font&gt;&lt;font color='red'&gt;&amp;nbsp;OffsetDays&lt;/font&gt;&lt;font color='blue'&gt;="-7"/&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;Value&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;Gt&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;br /&gt;&lt;font color='blue'&gt;&amp;lt;/&lt;/font&gt;&lt;font color='maroon'&gt;Where&lt;/font&gt;&lt;font color='blue'&gt;&amp;gt;&lt;/font&gt;&lt;font color='black'&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-4344509271775388665?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/4344509271775388665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=4344509271775388665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4344509271775388665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/4344509271775388665'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/05/querying-in-caml-relative-to-todays.html' title='Querying in CAML Relative to Today&apos;s Date'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-3225979353391122097</id><published>2007-05-29T17:19:00.000-07:00</published><updated>2007-05-29T17:29:49.261-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='features'/><title type='text'>Simple script to Remove and Redeploy a Feature</title><content type='html'>This script deactivates and deletes an existing feature, then redeploys this feature - it is useful when modifying features during development:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;REM Add the 12 Hive bin folder to the path for access to STSADM&lt;br /&gt;@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH%&lt;br /&gt;&lt;br /&gt;REM Configure local values&lt;br /&gt;set siteURL=[site URL here]&lt;br /&gt;set featureName=[Name of the feature]&lt;br /&gt;set WSP=[Name of the WSP file, including the WSP extension]&lt;br /&gt;&lt;br /&gt;REM Go to the folder containing the WSP file&lt;br /&gt;cd [Full path to the folder holding the WSP file]&lt;br /&gt;&lt;br /&gt;REM Remove the solution&lt;br /&gt;stsadm -o deactivatefeature -name %featureName% -url %siteURL% -force&lt;br /&gt;stsadm -o retractsolution -name %WSP% -immediate&lt;br /&gt;stsadm -o execadmsvcjobs&lt;br /&gt;stsadm -o deletesolution -name %WSP% -override&lt;br /&gt;stsadm -o execadmsvcjobs&lt;br /&gt;&lt;br /&gt;REM Add the solution&lt;br /&gt;stsadm -o addsolution -filename %WSP%&lt;br /&gt;stsadm -o execadmsvcjobs&lt;br /&gt;stsadm -o deploysolution -name %WSP% -immediate -allowgacdeployment&lt;br /&gt;stsadm -o execadmsvcjobs&lt;br /&gt;stsadm -o activatefeature -name %featureName% -url %siteURL% -force&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-3225979353391122097?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/3225979353391122097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=3225979353391122097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3225979353391122097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3225979353391122097'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/05/simple-script-to-remove-and-redeploy.html' title='Simple script to Remove and Redeploy a Feature'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-3616339862866938289</id><published>2007-05-20T21:54:00.000-07:00</published><updated>2007-05-20T22:00:36.144-07:00</updated><title type='text'>Changing the URL of a SharePoint Site Collection</title><content type='html'>Noticed that a site collection had a poor URL - to change the URL, backup the site and then restore using stsadm command-line operations:&lt;br /&gt;&lt;br /&gt;To backUp:&lt;br /&gt;stsadm -o backup -url {existing site collection URL} -filename {name of file}&lt;br /&gt;&lt;br /&gt;To restore:&lt;br /&gt;stsadm -o restore -url {new site collection url} -filename {name of file}&lt;br /&gt;&lt;br /&gt;Thanks to &lt;a href="http://blogs.technet.com/josebda/archive/2006/10/03/Renaming-a-Site-Collection.aspx"&gt;Jose Barreto&lt;/a&gt; for saving me the task of rebuilding the collection from scratch&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-3616339862866938289?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/3616339862866938289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=3616339862866938289' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3616339862866938289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/3616339862866938289'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/05/changing-url-of-sharepoint-site.html' title='Changing the URL of a SharePoint Site Collection'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5760703966775804012.post-6644575164616070961</id><published>2007-05-10T15:26:00.000-07:00</published><updated>2007-05-10T15:37:00.026-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Getting Users from Multi-select Person or Group Fields</title><content type='html'>The following code illustrates how to extract user information for all users listed in a multiselect Person or Group field (in this case extracting all the users listed in the "Control Owners" field of the first list item in the "Controls" list) :&lt;br /&gt;&lt;br /&gt;&lt;font color='blue'&gt;using&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(SPWeb&amp;nbsp;web&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;new&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;SPSite(WEB_URL).OpenWeb())&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringBuilder&amp;nbsp;sb&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;new&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;StringBuilder()&lt;/font&gt;&lt;font color='blue'&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;SPList&amp;nbsp;list&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;web.Lists[&lt;/font&gt;&lt;font color='#808080'&gt;"Controls"&lt;/font&gt;&lt;font color='black'&gt;]&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;SPFieldUserValueCollection&amp;nbsp;userVals&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(SPFieldUserValueCollection)list.Items[&lt;/font&gt;&lt;font color='maroon'&gt;0&lt;/font&gt;&lt;font color='black'&gt;][&lt;/font&gt;&lt;font color='#808080'&gt;"Control&amp;nbsp;Owners"&lt;/font&gt;&lt;font color='black'&gt;]&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;(SPFieldUserValue&amp;nbsp;userVal&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;in&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;userVals)&lt;br /&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;SPUser&amp;nbsp;user&amp;nbsp;&lt;/font&gt;&lt;font color='blue'&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;userVal.User&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;sb.AppendLine(&lt;/font&gt;&lt;font color='blue'&gt;string&lt;/font&gt;&lt;font color='black'&gt;.Format(&lt;/font&gt;&lt;font color='#808080'&gt;"{0}"&lt;/font&gt;&lt;font color='black'&gt;,&amp;nbsp;user.LoginName))&lt;/font&gt;&lt;font color='blue'&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color='black'&gt;}&lt;br /&gt;}&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5760703966775804012-6644575164616070961?l=sharethelearning.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharethelearning.blogspot.com/feeds/6644575164616070961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5760703966775804012&amp;postID=6644575164616070961' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6644575164616070961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5760703966775804012/posts/default/6644575164616070961'/><link rel='alternate' type='text/html' href='http://sharethelearning.blogspot.com/2007/05/getting-users-from-multi-select-person.html' title='Getting Users from Multi-select Person or Group Fields'/><author><name>whats.to.learn.today</name><uri>http://www.blogger.com/profile/06525868686626493995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
