<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5760703966775804012</atom:id><lastBuildDate>Sun, 08 Nov 2009 23:05:46 +0000</lastBuildDate><title>Share The Learning</title><description>Discoveries, glimpses, insights, and links to useful stuff about SharePoint and software development in general.</description><link>http://sharethelearning.blogspot.com/</link><managingEditor>noreply@blogger.com (whats.to.learn.today)</managingEditor><generator>Blogger</generator><openSearch:totalResults>107</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ShareTheLearning" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-2690282028185927297</guid><pubDate>Tue, 19 May 2009 20:41:00 +0000</pubDate><atom:updated>2009-05-19T13:46:59.487-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">deploy</category><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">errors</category><title>WSPBuilder Fails to Copy Assembly to GAC</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/05/wspbuilder-fails-to-copy-assembly-to.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-2611467354477123221</guid><pubDate>Fri, 01 May 2009 02:37:00 +0000</pubDate><atom:updated>2009-04-30T19:41:37.302-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">deploy</category><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><title>And I Quote, “Problem I Find With SharePoint…”</title><description>&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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/04/and-i-quote-problem-i-find-with.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-152560234411249878</guid><pubDate>Tue, 07 Apr 2009 07:29:00 +0000</pubDate><atom:updated>2009-04-07T17:32:38.819-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JQuery</category><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">custom field</category><title>SharePoint Custom Field - jQuery Script in a List Form</title><description>&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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/04/sharepoint-custom-field-jquery-script.html</link><author>noreply@blogger.com (whats.to.learn.today)</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 xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-8096899931665946233</guid><pubDate>Thu, 02 Apr 2009 20:10:00 +0000</pubDate><atom:updated>2009-04-02T13:24:47.788-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">errors</category><title>The "Open With Windows Explorer" Action Fails - Nothing Happens!</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/04/open-with-windows-explorer-action-fails.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-562693988816490723</guid><pubDate>Thu, 26 Mar 2009 19:15:00 +0000</pubDate><atom:updated>2009-03-26T12:51:19.888-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">configuration</category><category domain="http://www.blogger.com/atom/ns#">errors</category><title>Missing Page Editing Toolbar? Breadcrumb Links Wrong?</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/03/missing-page-editing-toolbar-breadcrumb.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-7475402514093498754</guid><pubDate>Fri, 06 Mar 2009 03:25:00 +0000</pubDate><atom:updated>2009-03-05T19:50:00.319-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">search</category><category domain="http://www.blogger.com/atom/ns#">web service</category><category domain="http://www.blogger.com/atom/ns#">web parts</category><category domain="http://www.blogger.com/atom/ns#">data view</category><title>Building a Query Web Service Call Declaratively in a Data Source</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/03/building-query-web-service-call.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-7268410386624248136</guid><pubDate>Sun, 15 Feb 2009 19:03:00 +0000</pubDate><atom:updated>2009-02-15T11:22:54.230-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><title>Note Field Removes Script (and Inline Style) When Saving</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/02/note-field-removes-script-and-inline.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-6305144227787356383</guid><pubDate>Thu, 12 Feb 2009 19:01:00 +0000</pubDate><atom:updated>2009-02-12T11:32:18.851-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">development</category><title>Unlearning My Development Process</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/02/unlearning-my-development-process.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-2315570341973577594</guid><pubDate>Thu, 29 Jan 2009 22:26:00 +0000</pubDate><atom:updated>2009-01-29T17:35:35.387-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JQuery</category><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><title>More SharePoint Rounded Corners</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/01/more-sharepoint-rounded-corners.html</link><author>noreply@blogger.com (whats.to.learn.today)</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 xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-3973580782201634241</guid><pubDate>Thu, 15 Jan 2009 02:14:00 +0000</pubDate><atom:updated>2009-01-14T18:27:15.155-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">errors</category><title>Missing Buttons and Link on the Add Web Part Page</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2009/01/missing-buttons-and-link-on-add-web.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-6734064695329959771</guid><pubDate>Wed, 26 Nov 2008 19:24:00 +0000</pubDate><atom:updated>2008-11-26T12:52:59.617-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JQuery</category><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">custom field</category><title>jQuery in a SharePoint Custom Field</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/11/jquery-in-sharepoint-custom-field.html</link><author>noreply@blogger.com (whats.to.learn.today)</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 xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-7466684142472939422</guid><pubDate>Thu, 20 Nov 2008 03:02:00 +0000</pubDate><atom:updated>2008-11-19T19:38:02.865-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">silverlight</category><title>Silverlight in a Content Editor Web Part</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/11/silverlight-in-content-editor-web-part.html</link><author>noreply@blogger.com (whats.to.learn.today)</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 xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-6748217069611900337</guid><pubDate>Thu, 20 Nov 2008 00:49:00 +0000</pubDate><atom:updated>2008-11-19T17:36:40.435-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JQuery</category><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">web parts</category><title>Using jQuery for AJAX User Profile Queries in SharePoint</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/11/using-jquery-for-ajax-user-profile.html</link><author>noreply@blogger.com (whats.to.learn.today)</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 xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-5306181013934780456</guid><pubDate>Thu, 13 Nov 2008 00:59:00 +0000</pubDate><atom:updated>2008-11-12T17:52:19.873-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">JQuery</category><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><title>jQuery in SharePoint Example - Rounded Corners</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/11/jquery-in-sharepoint-example-rounded.html</link><author>noreply@blogger.com (whats.to.learn.today)</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 xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-2967076750159851721</guid><pubDate>Sun, 02 Nov 2008 20:19:00 +0000</pubDate><atom:updated>2008-11-03T15:03:48.578-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JQuery</category><category domain="http://www.blogger.com/atom/ns#">talk</category><title>jQuery Introduction Talk at Christchurch Code Camp</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/11/jquery-introduction-talk-at.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-4988905149150182362</guid><pubDate>Mon, 20 Oct 2008 20:57:00 +0000</pubDate><atom:updated>2008-10-20T14:13:06.518-07:00</atom:updated><title>Revisiting ddwrt and FormatDate</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/10/revisiting-ddwrt-and-formatdate.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-7492024525569053355</guid><pubDate>Thu, 02 Oct 2008 04:54:00 +0000</pubDate><atom:updated>2008-11-12T16:48:38.029-08:00</atom:updated><title>Displaying the Raw Search Results</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/10/displaying-raw-search-results.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-4478035045231449240</guid><pubDate>Thu, 02 Oct 2008 04:34:00 +0000</pubDate><atom:updated>2008-10-01T21:54:18.771-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">customisation</category><title>Custom Web Part Pages Template Woes</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/10/custom-web-part-pages-template-woes.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-6951430461360068616</guid><pubDate>Wed, 06 Aug 2008 03:37:00 +0000</pubDate><atom:updated>2008-08-07T22:52:42.386-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">wiki</category><title>Adding Default Content to a SharePoint Wiki</title><description>&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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/08/adding-default-content-to-sharepoint.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-3418719250512631059</guid><pubDate>Wed, 06 Aug 2008 00:07:00 +0000</pubDate><atom:updated>2008-08-05T18:07:34.239-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JQuery</category><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><title>Another Way to Enrich Your SharePoint Forms - JQuery</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/08/another-way-to-enrich-your-sharepoint.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-8271633343615227160</guid><pubDate>Sun, 27 Jul 2008 20:26:00 +0000</pubDate><atom:updated>2008-07-27T14:11:05.305-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">testing</category><category domain="http://www.blogger.com/atom/ns#">architecture</category><title>The SharePoint Paradox - Too Many Hammers</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/07/sharepoint-paradox-too-many-hammers.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-9194943612881194929</guid><pubDate>Wed, 16 Jul 2008 21:58:00 +0000</pubDate><atom:updated>2008-07-16T15:10:47.805-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">search</category><title>Getting that PDF Indexing to work in MOSS</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/07/getting-that-pdf-indexing-to-work-in.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-4457561058814982857</guid><pubDate>Wed, 02 Jul 2008 00:31:00 +0000</pubDate><atom:updated>2008-07-01T17:49:36.607-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">security</category><title>Hide the "View All Site Content" Quick Launch Link</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/07/hide-view-all-site-content-quick-launch.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-5289339655636993940</guid><pubDate>Wed, 18 Jun 2008 01:31:00 +0000</pubDate><atom:updated>2008-06-17T18:48:44.826-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">configuration</category><category domain="http://www.blogger.com/atom/ns#">errors</category><title>WSS Search and Breadcrumb Links Fail over SSL</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/06/wss-search-and-breadcrumb-links-fail.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5760703966775804012.post-2508408427760419446</guid><pubDate>Tue, 17 Jun 2008 01:31:00 +0000</pubDate><atom:updated>2008-06-16T19:17:46.526-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sharepoint</category><category domain="http://www.blogger.com/atom/ns#">hosting</category><title>Double-check your hosting company's infrastructure</title><description>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'/&gt;&lt;/div&gt;</description><link>http://sharethelearning.blogspot.com/2008/06/double-check-your-hosting-companys.html</link><author>noreply@blogger.com (whats.to.learn.today)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>
