<?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/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-691739770978360344</atom:id><lastBuildDate>Tue, 24 Jan 2012 16:50:37 +0000</lastBuildDate><category>install</category><category>gallery</category><category>education</category><category>Visual Studio</category><category>WebServices</category><category>SharePoint Saturday</category><category>FormsServer</category><category>wiki</category><category>solution</category><category>MOSS 2007</category><category>Enterprise Taxonomy Management</category><category>Cache</category><category>bug</category><category>master page</category><category>how to</category><category>Navigation</category><category>Anonymous</category><category>Client Code</category><category>new release</category><category>conference</category><category>Variations</category><category>presentation</category><category>ASP.NET</category><category>Product Customization</category><category>Ribbon</category><category>restore</category><category>Code</category><category>WF</category><category>team site</category><category>community benefit</category><category>Tokens</category><category>Web Part</category><category>Code Free</category><category>assembly folder</category><category>wss</category><category>CRM SharePoint Connector</category><category>spell check</category><category>MOSS</category><category>delegate controls</category><category>technical problem</category><category>Sandbox Solution</category><category>Replaceable Parameters</category><category>Events</category><category>Visual Studio 2010 Tools for SharePoint</category><category>Virtual Machine</category><category>back up</category><category>Undocumented</category><category>WCM</category><category>Social</category><category>site template</category><category>Internet</category><category>Publishing</category><category>content sources</category><category>XSL</category><category>CRM</category><category>REST</category><category>KPI</category><category>SharePoint</category><category>Workflow</category><category>Developer</category><category>special offer</category><category>CAML</category><category>codeplex</category><category>WSP</category><category>SharePoint 2010</category><category>Search</category><category>HyperV</category><category>C#</category><category>giving back</category><category>smart pages</category><category>SLK</category><category>SCORM</category><category>Filter</category><category>feature</category><category>SEO</category><category>SharePoint Designer</category><category>Asmx</category><category>Audience</category><category>Data View Web Part</category><category>JavaScript</category><category>Sun VirtaulBox</category><category>InfoPath</category><category>Impersonation</category><category>Excel</category><title>KWizCom SharePoint Blog</title><description>A blog by the KWizCom SharePoint experts!
The KWizCom team, led by it&amp;#39;s VP R&amp;amp;D Shai Petel, utilizes its experience and knowledge to give a unique insight on Microsoft&amp;#39;s SharePoint platform - the leading business collaboration platform.</description><link>http://kwizcom.blogspot.com/</link><managingEditor>noreply@blogger.com (Shai Petel)</managingEditor><generator>Blogger</generator><openSearch:totalResults>146</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/KwizcomSharepointBlog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="kwizcomsharepointblog" /><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-691739770978360344.post-3182485966020502192</guid><pubDate>Wed, 04 Jan 2012 23:04:00 +0000</pubDate><atom:updated>2012-01-04T15:04:24.923-08:00</atom:updated><title>Speaking Engagements 2012</title><description>&lt;p&gt;My 2012 speaking engagements are posted below,    &lt;br /&gt;If you are around – come see me!     &lt;br /&gt;If you were in one of my sessions, you can find links to the session code and presentation below. Also – if you have any comments on my session – feel free to post it here! &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;January 7 2012&lt;/strong&gt; – &lt;a href="http://www.sharepointsaturday.org/virginiabeach/default.aspx"&gt;SPS Virginia Beach&lt;/a&gt; – Session unknown… – Cancelled due to other obligations. Sorry I couldn’t make it!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;January 18 2012&lt;/strong&gt; – &lt;a href="http://www.meetup.com/TorontoSPUG/" target="_blank"&gt;Toronto SharePoint User Group&lt;/a&gt; - &lt;a href="http://kwizcom.blogspot.com/2011/10/developers-guide-how-to-enhance-your.html"&gt;Developer’s guide: how to enhance your SP performance: Understanding caching&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;May 16 2012&lt;/strong&gt; – &lt;a href="http://www.sharepointsummit.org/Toronto/conference-day3.htm#session_13_3" target="_blank"&gt;Toronto SharePoint Summit&lt;/a&gt;- &lt;a href="http://kwizcom.blogspot.com/2011/10/developers-guide-how-to-enhance-your.html"&gt;Developer’s guide: how to enhance your SP performance: Understanding caching&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;My 2011 speaking engagements can be found &lt;a href="http://kwizcom.blogspot.com/2010/11/speaking-engagements-2011.html" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-3182485966020502192?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2012/01/speaking-engagements-2012.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-9324870977872148</guid><pubDate>Tue, 29 Nov 2011 20:27:00 +0000</pubDate><atom:updated>2011-11-29T12:27:43.586-08:00</atom:updated><title>SharePoint Popup Scroll gone after autoSize</title><description>&lt;p&gt;I’m writing this post after not finding anything about this problem in Google.&lt;/p&gt;  &lt;h3&gt;The issue&lt;/h3&gt;  &lt;p&gt;When you have a SharePoint 2010 popup dialog, that uses autoSize (like the new item / edit item forms in any SharePoint list), if you call “window.frameElement.autoSize()” second time, there is no scroll in the popup.&lt;/p&gt;  &lt;p&gt;Say you have a field control or a web part that changes in height when the user interacts with it. In my case, I was working on a “repeating rows” field type, where the user can add as many rows to the field as he wants – much like in InfoPath.&lt;/p&gt;  &lt;p&gt;When the user add new rows, the height of my popup changes, so I have to resize it.&lt;/p&gt;  &lt;p&gt;Documentation is pretty clear, call window.frameElement.autoSize() and it should resize your dialog.&lt;/p&gt;  &lt;p&gt;Apparently, this works well for the first time you call it, but for some reason if I call it second/third/ninth time – once the popup is too high the vertical scroll is gone.&lt;/p&gt;  &lt;p&gt;Another issue is, that even when it does fit to the page – the top of the popup does not move up so you end up having to move the popup to the top of the page yourself.&lt;/p&gt;  &lt;p&gt;This caused great frustration for some of our customers, and by extent – our product manager and support – and by extent – me!&lt;/p&gt;  &lt;h3&gt;The solution&lt;/h3&gt;  &lt;p&gt;I knew I was along in this, since not only Google did not have any solution for this issue – I could not even find someone asking about it in any forums / mailing list.&lt;/p&gt;  &lt;p&gt;So, since waiting for a Microsoft fix for this, which may or may not come eventually (after all this issue is introduced with custom development and not on OOB scenarios), I had to dig deep and get dirty with Microsoft JavaScript and popup DOM.&lt;/p&gt;  &lt;p&gt;It wasn’t pretty, I tell you, but I did find lots of cool stuff, like a function that calculates the width of the scroll bars in the browser :) (yeah, they actually have a function for it!)&lt;/p&gt;  &lt;p&gt;Well, it appears that the popup have few divs and iframe behind it to make it look and work so cool (great job on that Microsoft!), I figured the problem was that the height was not calculating correctly on the second call to autoSize. It disregards the maximum size of the parent window, and does not reposition the window vertically.&lt;/p&gt;  &lt;p&gt;I had to do it myself.&lt;/p&gt;  &lt;p&gt;I came up with this code, now – it is not fail proof, and might not work on some scenarios – but it did work for me, our QA and our customers. I will appreciate if you have any comments or fixes to this code, or if you know of another more “clean” solution to this issue.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #006400"&gt;//call autoSize&lt;br /&gt;&lt;/span&gt;window.frameElement.autoSize();&lt;br /&gt;&lt;span style="color: #006400"&gt;//Fix scroll bar and positioning. $kw is our alias for jQuery&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;bodyHeight = $kw(top.document.body).height();&lt;br /&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;dialogMaxHeight = bodyHeight - 60;&lt;br /&gt;&lt;span style="color: #006400"&gt;//if dialog is too high&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;($kw(window.frameElement).height() &amp;gt; dialogMaxHeight) {&lt;br /&gt;    &lt;span style="color: #006400"&gt;//move dialog to top&lt;br /&gt;    &lt;/span&gt;top.document.getElementsByClassName(&lt;span style="color: maroon"&gt;'ms-dlgContent'&lt;/span&gt;)[0].style.top = &lt;span style="color: maroon"&gt;'8px'&lt;/span&gt;;&lt;br /&gt;    top.document.getElementsByClassName(&lt;span style="color: maroon"&gt;'ms-dlgContent'&lt;/span&gt;)[0].previousSibling.style.top = &lt;span style="color: maroon"&gt;'8px'&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: #006400"&gt;//resize all dialog divs/frames/whatnot&lt;br /&gt;    &lt;/span&gt;window.frameElement.style.height = dialogMaxHeight + &lt;span style="color: maroon"&gt;'px'&lt;/span&gt;;&lt;br /&gt;    top.document.getElementsByClassName(&lt;span style="color: maroon"&gt;'ms-dlgContent'&lt;/span&gt;)[0].previousSibling.style.height = dialogMaxHeight + &lt;span style="color: maroon"&gt;'px'&lt;/span&gt;;&lt;br /&gt;    top.document.getElementsByClassName(&lt;span style="color: maroon"&gt;'ms-dlgContent'&lt;/span&gt;)[0].style.height = dialogMaxHeight + 32 + &lt;span style="color: maroon"&gt;'px'&lt;/span&gt;;&lt;br /&gt;    top.document.getElementsByClassName(&lt;span style="color: maroon"&gt;'ms-dlgBorder'&lt;/span&gt;)[0].style.height = dialogMaxHeight + 32 + &lt;span style="color: maroon"&gt;'px'&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: #006400"&gt;//end issue fix&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Thanks, Shai.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-9324870977872148?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/11/sharepoint-popup-scroll-gone-after.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-3129226863028146289</guid><pubDate>Thu, 24 Nov 2011 15:52:00 +0000</pubDate><atom:updated>2011-11-24T07:52:40.908-08:00</atom:updated><title>Redirect to custom error page from event handler</title><description>&lt;p&gt;I’ve seen a lot of posts saying you can’t redirect to a custom error page from a SPItemEventReceiver in SharePoint 2007.&lt;/p&gt;  &lt;p&gt;In 2010, you can use Properties.RedirectUrl which will send you to a custom error page, instead of the OOB error page that displays your properties.ErrorMessage. this is simple enough, all you have to do is set properties.Cancel = true – and the custom redirect Url kicks in.&lt;/p&gt;  &lt;p&gt;But still, in 2007 this property does not exist, and in 2010 – you might want to have a custom redirect page and not cancel the event.&lt;/p&gt;  &lt;p&gt;Good news – it is all possible!&lt;/p&gt;  &lt;h3&gt;Redirecting&lt;/h3&gt;  &lt;p&gt;The way to do it, is to add some code to a sync event. Async events can’t help you since they are not guaranteed to run immediately, and they don’t have any user context when they execute…&lt;/p&gt;  &lt;p&gt;You can use the SPUtility.Redirect(PageUrl, SPRedirectFlags, HTTPContext); within your ItemAdding, ItemUpdating or ItemDeleting event handler to redirect your user to a custom page.&lt;/p&gt;  &lt;p&gt;This redirection kicks in and throws the “ThreadAbortException”, stopping the rest of your code from running and redirecting the user to your custom page.&lt;/p&gt;  &lt;p&gt;Few things to know:&lt;/p&gt;  &lt;p&gt;1. ThreadAbortException is a “catch me if you can” exception. you can put it in try…catch… block, but this exception will always bubble up and be thrown again and again. essentially, only the catch and finally code blocks will run after this exception is thrown. you can set “SPRedirectFlags.DoNotEndResponse” if you don’t want this exception to be thrown and it should still redirect at the end, but using SPRedirectFlags.Default will throw it.&lt;/p&gt;  &lt;p&gt;2. You may notice, that if you try using HTTPContext.Current in your event handler method – you will get a null context. So, the only way to get the HTTPContext.Current is in your event handler class constructor. save it as a member, and use it in your event handlers. DONT SAVE IT AS A STATIC MEMBER! Use any instance member (private/public/protected…) but don’t use a static member as you may run into unexpected trouble.&lt;/p&gt;  &lt;h3&gt;Cancelling the event&lt;/h3&gt;  &lt;p&gt;Now, we took care of redirecting, but it is good to remember that this on its own will not cancel the item event and it will still be updated/added/deleted.&lt;/p&gt;  &lt;p&gt;If you want to cancel the item event, you still have to do that using properties.Cancel = true.&lt;/p&gt;  &lt;p&gt;Since we talked about ThreadAbortException – now you know you have to put the SPUtility.Redirect code in a try block, and set the properties.Cancel in the catch block.&lt;/p&gt;  &lt;h3&gt;Code Example:&lt;/h3&gt;  &lt;p&gt;Your code should look like this:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;try&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;SPUtility&lt;/span&gt;.Redirect(&lt;span style="color: #a31515"&gt;&amp;quot;/_layouts/KWizCom/AppError.aspx?ErMsg=&amp;quot; &lt;/span&gt;+ errMessage, &lt;span style="color: #2b91af"&gt;SPRedirectFlags&lt;/span&gt;.DoNotEndResponse, currentContext);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: blue"&gt;catch&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    properties.ErrorMessage = errMessage;&lt;br /&gt;    properties.Cancel = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Good luck!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-3129226863028146289?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/11/redirect-to-custom-error-page-from.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-7566805813736225108</guid><pubDate>Sat, 29 Oct 2011 16:16:00 +0000</pubDate><atom:updated>2011-10-29T09:16:33.882-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Publishing</category><category domain="http://www.blogger.com/atom/ns#">Events</category><category domain="http://www.blogger.com/atom/ns#">Cache</category><category domain="http://www.blogger.com/atom/ns#">SharePoint Saturday</category><category domain="http://www.blogger.com/atom/ns#">SharePoint 2010</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">how to</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Developer</category><category domain="http://www.blogger.com/atom/ns#">presentation</category><title>Developer's Guide: How to enhance your SharePoint performance - Understand Caching</title><description>I have just finished my presentation at SharePoint Saturday Twin Cities!&lt;br /&gt;
&lt;br /&gt;
I talked with developers and ITPro on how to enhance their SharePoint and SharePoint customization performance using some of the built in caching features, such as:&lt;br /&gt;
- BLOB cache&lt;br /&gt;
- Ghost files&lt;br /&gt;
- Object cache&lt;br /&gt;
- Page output cache&lt;br /&gt;
As well as other coding practices, such as:&lt;br /&gt;
- Query pagination&lt;br /&gt;
- Indexed columns&lt;br /&gt;
- Throttling&lt;br /&gt;
- Code cache in multi-threaded environment&lt;br /&gt;
&lt;br /&gt;
Here is the complete presentation, download to read comments in each slide:&lt;br /&gt;
&lt;div style="width:425px" id="__ss_9939826"&gt;&lt;strong style="display:block;margin:12px 0 4px"&gt;&lt;a href="http://www.slideshare.net/shaibs/developers-guide-understand-caching" title="Developer’s guide understand caching" target="_blank"&gt;Developer’s guide understand caching&lt;/a&gt;&lt;/strong&gt; &lt;iframe src="http://www.slideshare.net/slideshow/embed_code/9939826" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"&gt;&lt;/iframe&gt; &lt;div style="padding:5px 0 12px"&gt;View more &lt;a href="http://www.slideshare.net/" target="_blank"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/shaibs" target="_blank"&gt;Shai Petel&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-7566805813736225108?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/10/developers-guide-how-to-enhance-your.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-220270787178273668</guid><pubDate>Thu, 15 Sep 2011 16:45:00 +0000</pubDate><atom:updated>2011-09-15T09:45:31.654-07:00</atom:updated><title>Windows 8 Developer Preview!</title><description>&lt;p&gt;Finally, My Lenovo tablet, x201, multi touch screen, will be more cool than my iPad!&lt;/p&gt;  &lt;p&gt;and that’s saying a lot!&lt;/p&gt;  &lt;p&gt;I just installed windows 8 on my hyper V, looks real nice.&lt;/p&gt;  &lt;p&gt;First impressions:&lt;/p&gt;  &lt;h2&gt;Login&lt;/h2&gt;  &lt;p&gt;First of all, logging in to windows is now done using your live ID login (email and password) and it promises to keep your desktop settings synced across all your PC’s.&lt;/p&gt;  &lt;p&gt;Login screen itself reminds me of a welcome screen on a smartphone:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-ZXkMn2uYiZw/TnIreJJ48uI/AAAAAAAAANY/OH9UiEyr0Do/s1600-h/image%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-6Yblv4REqXQ/TnIrff_ZZgI/AAAAAAAAANc/XH75kXcau-Y/image_thumb.png?imgmax=800" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Nice, finally some info on the boring lock screen. didn't ask for much, clock and date will defiantly suffice.&lt;/p&gt;  &lt;h2&gt;The new Start menu&lt;/h2&gt;  &lt;p&gt;Logging in with my live id, gets me to the new start menu. Yeah – you heard me.   &lt;br /&gt;It feels like they took windows 7, build a huge new start menu, and hid windows desktop behind the start menu – and it looks and feels great!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-Rylmn_QYPt8/TnIrgf-rntI/AAAAAAAAANg/cGO6v7IOOWs/s1600-h/image%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-_h79e9Y8hrw/TnIrg-nbGUI/AAAAAAAAANk/CSaSw1wjB8M/image_thumb%25255B1%25255D.png?imgmax=800" width="244" height="137" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Build for wide screen displays, high res, and for touch – obviously!&lt;/p&gt;  &lt;p&gt;While in this mode, you work in a table or smartphone look and feel. Every app you open takes up the whole screen, so no more confusing display of many small windows. I guess, for the average user that is pretty good, while for work that might be less useful.&lt;/p&gt;  &lt;h3&gt;Start menu apps&lt;/h3&gt;  &lt;p&gt;The new internet explorer looks pretty amazing and works very well. check out this new “tiles” instead of tabs:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-_L6gU0hyzDg/TnIriGAEqFI/AAAAAAAAANo/zayWz-SYjSU/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-IiCPtRvPGHI/TnIriQiRkmI/AAAAAAAAANs/aDklYkUPZ9A/image_thumb%25255B2%25255D.png?imgmax=800" width="244" height="154" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;overall, the new UI with large buttons made for touch.&lt;/p&gt;  &lt;p&gt;This build ships with a built-in twitter application called &lt;a href="mailto:tweet@rama"&gt;tweet@rama&lt;/a&gt;, which might reminds you of something else already out there (pardon the blur, for protecting my info):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-2j_HcGx4kjs/TnIrj3tmPWI/AAAAAAAAANw/QplHQO_5-AE/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-07Tqw6eo2kM/TnIrkenahCI/AAAAAAAAAN0/pbvIVwiFhOs/image_thumb%25255B4%25255D.png?imgmax=800" width="244" height="155" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Start menu UX&lt;/h3&gt;  &lt;p&gt;Another change you might notice while in this new menu, is that the windows key in your keyboard is now used to switching between you current active application and back to the menu. As mentioned before, you can only have one application opened at a time, and it works in full screen only, which honestly makes more sense to me and is much better user experience especially for non-developer users.&lt;/p&gt;  &lt;p&gt;I am sure this new UX will increase adaptability to the new system by the public who is now more and more used to smart phones.&lt;/p&gt;  &lt;h2&gt;And… Windows Desktop&lt;/h2&gt;  &lt;p&gt;One of the tiles in the start menu allows you to get to the original windows desktop mode:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-w7JhfFKz3JM/TnIrmLUS8TI/AAAAAAAAAN4/q7v6oSE5sUs/s1600-h/image%25255B17%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-ejxPvQvbnTI/TnIrmvGyQLI/AAAAAAAAAN8/pY0IUA--j8o/image_thumb%25255B5%25255D.png?imgmax=800" width="244" height="154" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;reminds me of windows 7 so far, but – careful! clicking the start menu will not open a start menu as you know it, but will bring you back to the new start menu with the huge tiles we got on logon.&lt;/p&gt;  &lt;p&gt;task manager had a serious face lift as well, with a minimal view:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-5rrF-T9qQzw/TnIrnklI5sI/AAAAAAAAAOA/Kf3BayEypEs/s1600-h/image%25255B20%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-WYkL3VaRvNs/TnIroF9bBXI/AAAAAAAAAOE/aIDjHfMSxvM/image_thumb%25255B6%25255D.png?imgmax=800" width="243" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;and&amp;#160; advanced views:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-kgv-AK_u3As/TnIroSih1GI/AAAAAAAAAOI/XNL3g2pImCU/s1600-h/image%25255B23%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-vxZev_pg6Mc/TnIro_NQcEI/AAAAAAAAAOM/nPEdF1ypB5k/image_thumb%25255B7%25255D.png?imgmax=800" width="244" height="223" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/-qlzVNhtcLQw/TnIrpVJ20TI/AAAAAAAAAOQ/pAEDfc5mRsw/s1600-h/image%25255B26%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-Dd3Mb_dDHko/TnIrpiifZ8I/AAAAAAAAAOU/QYQRGzDL2Xk/image_thumb%25255B8%25255D.png?imgmax=800" width="244" height="224" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/-ZaH0h4Z1SPA/TnIrqMQKK9I/AAAAAAAAAOY/wLLg3VoC5p4/s1600-h/image%25255B29%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-evDO6lacemI/TnIrqlXncxI/AAAAAAAAAOc/s79cfL2EdyI/image_thumb%25255B9%25255D.png?imgmax=800" width="244" height="223" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Overall, super excited!&lt;/h2&gt;  &lt;p&gt;As a long time advocate of touch screens, and the owner of 3(!) windows based multi touch computers (2 laptops and 1 HT TouchSmart) I can safely say I have waited a long time for this, and Microsoft did not disappoint!&lt;/p&gt;  &lt;p&gt;To me, this is a huge breakthrough that will finally windows OS to lots of people, who can easily use a smart phone or and iPad but found the mouse-keyboard interaction a bit confusing.&lt;/p&gt;  &lt;p&gt;Ok, I know this type of posts is not typical for me, a non technical product eval type of post, but I guess I am just too much excited!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-220270787178273668?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/09/windows-8-developer-preview.html</link><author>noreply@blogger.com (Shai Petel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-6Yblv4REqXQ/TnIrff_ZZgI/AAAAAAAAANc/XH75kXcau-Y/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-2117589740470770540</guid><pubDate>Tue, 06 Sep 2011 20:04:00 +0000</pubDate><atom:updated>2011-09-06T13:04:48.474-07:00</atom:updated><title>Error: “value cannot be null parameter name publickey”</title><description>&lt;p&gt;I just had a very strange error message in my visual studio 2010 SharePoint project…&lt;/p&gt;  &lt;p&gt;When building the project everything goes well, but when packaging it or deploying it I got this error message:&lt;/p&gt;  &lt;p&gt;“value cannot be null parameter name publickey”&lt;/p&gt;  &lt;p&gt;Also, trying to open the package editor in visual studio to take a look at the “preview of packaged manifest” showed me the same error:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-Gg5AJ8Gvv-0/TmZ83WBh15I/AAAAAAAAANQ/DhOpSferFq4/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-cI427KJohF0/TmZ83-lT46I/AAAAAAAAANU/GyMcWnaE0go/image_thumb%25255B1%25255D.png?imgmax=800" width="650" height="384" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Google did not prove to be useful as I did not find anything close to this error message.&lt;/p&gt;  &lt;p&gt;Well, in the interest of saving you time, let me just say that after some search around the project I found that the strong name signing of my project was missing the signature file (SNK), which produced an unsigned DLL, and as such – I guess caused this issue with the package building.&lt;/p&gt;  &lt;p&gt;Hope this will at least save some time to anyone else out there,&lt;/p&gt;  &lt;p&gt;Happy SharePointing!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-2117589740470770540?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/09/error-value-cannot-be-null-parameter.html</link><author>noreply@blogger.com (Shai Petel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-cI427KJohF0/TmZ83-lT46I/AAAAAAAAANU/GyMcWnaE0go/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-1881292430141326415</guid><pubDate>Mon, 27 Jun 2011 20:42:00 +0000</pubDate><atom:updated>2011-06-27T13:43:29.138-07:00</atom:updated><title>Accessing SharePoint Silverlight 4 API from outside of SharePoint</title><description>&lt;p&gt;If you are like me, building Silverlight SharePoint components, you probably noticed that debugging Silverlight running from within a SharePoint solution is almost impossible!&lt;/p&gt;  &lt;p&gt;There are many settings to take care of, and you have to install and configure your server to allow debugging, honestly I gave up in the middle.&lt;/p&gt;  &lt;p&gt;Instead, I though, why not run the Silverlight application locally, and have it connect to the SharePoint API?&lt;/p&gt;  &lt;p&gt;Well, try that and you will be in to a little surprise.&lt;/p&gt;  &lt;p&gt;Any Microsoft.SharePoint.Client.Silverlight call you make will get you a System.Security.SecurityException: Security error.&lt;/p&gt;  &lt;p&gt;Not a lot of info there, but this is easy to fix and not documented well enough anywhere in all the Silverlight SharePoint development guides I looked at.&lt;/p&gt;  &lt;p&gt;The cause for this error, is that Silverlight blocks cross domain access by default, preventing applications from one domain to invoke requests from another domain, unless the remove domain explicitly allows it.&lt;/p&gt;  &lt;p&gt;To allow that call, Silverlight makes a request to the root of the remote server to read a configuration file named &lt;strong&gt;clientaccesspolicy.xml&lt;/strong&gt;, if this file does not exist – Silverlight checks for a flash configuration policy file instead (but lets focus on pure Silverlight 4 for now.)&lt;/p&gt;  &lt;p&gt;In order to allow cross domain requests to be executed, just put this configuration file in the root of your web application (next to the web.config file):&lt;/p&gt;  &lt;p&gt;file name: clientaccesspolicy.xml&lt;/p&gt; &lt;p&gt; &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;?&amp;gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;access-policy&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;cross-domain-access&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;policy&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;   &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;allow-from &lt;/span&gt;&lt;span style="color: red"&gt;http-request-headers&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;*&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;   &lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;domain &lt;/span&gt;&lt;span style="color: red"&gt;uri&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;*&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;   &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;allow-from&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;   &lt;br /&gt;   &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;grant-to&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;   &lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;resource &lt;/span&gt;&lt;span style="color: red"&gt;path&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;include-subpaths&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;   &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;grant-to&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;   &lt;br /&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;policy&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;cross-domain-access&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;access-policy&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Once you have this file, you should be able to run and debug your Silverlight application from anywhere, making it easy to debug your SharePoint Silverlight applications on either dev, testing or production servers!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Cheers, Shai.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-1881292430141326415?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/06/accessing-sharepoint-silverlight-4-api.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-2193079291574128538</guid><pubDate>Wed, 01 Jun 2011 16:09:00 +0000</pubDate><atom:updated>2011-06-01T09:10:01.442-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">Developer</category><title>Visual Studio 2010 find and replace window too wide</title><description>&lt;p&gt;Do you have that problem too?&lt;/p&gt;  &lt;p&gt;Every once in a while when you hit Ctrl+f the find and replace dialog is way too wide, growing and growing and does not fit your screen?&lt;/p&gt;  &lt;p&gt;Well, you are not alone.&lt;/p&gt;  &lt;p&gt;It seems that every time you close and open this window, it grow just a few pixel wider… So slowly and surly it become ridiculously wide forcing you to tame it, yet once again.&lt;/p&gt;  &lt;p&gt;This has become quite a familiar game for developers – but no more!&lt;/p&gt;  &lt;p&gt;Apparently this is a know issue with a fix available:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/2268081"&gt;http://support.microsoft.com/kb/2268081&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;good luck!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-2193079291574128538?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/06/visual-studio-2010-find-and-replace.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-1299183553622572112</guid><pubDate>Tue, 31 May 2011 03:33:00 +0000</pubDate><atom:updated>2011-05-31T06:35:28.604-07:00</atom:updated><title>Web part functional specifications document template</title><description>&lt;div&gt;&lt;div&gt;Hi&lt;/div&gt;&lt;div&gt;Following my last session at the &lt;a href="http://www.meetup.com/TSPBUG/"&gt;Toronto SharePoint Business user group&lt;/a&gt;, here's a link to &lt;a href="http://www.kwizcom.com/objects/designDocs/SharePoint_web_part_functional_specifications_document.docx"&gt;web part functional specifications document template&lt;/a&gt; I've mentioned there.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;The purpose of this template is to help SharePoint business analysts to make sure they fully cover all functional aspects when designing a custom developed web part.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Please feel free to comment. &lt;/div&gt;&lt;div&gt;Coming soon: SharePoint site functional specifications template.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Cheers&lt;/div&gt;&lt;div&gt;Nimrod&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-1299183553622572112?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/05/web-part-functional-specifications.html</link><author>noreply@blogger.com (Nimrod Geva)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-7670309602186409574</guid><pubDate>Mon, 30 May 2011 21:32:00 +0000</pubDate><atom:updated>2011-05-31T08:58:13.292-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint 2010</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">how to</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Developer</category><category domain="http://www.blogger.com/atom/ns#">Code</category><title>Setting default value to column in document library</title><description>&lt;p&gt;Hi,&lt;/p&gt;  &lt;h2&gt;One question I hear a lot from developers and system designers is “How can I set a default value to a column in a document library”?&lt;/h2&gt;  &lt;p&gt;The same goes for form libraries in SharePoint, Apparently SharePoint does not support default values for document libraries.&lt;/p&gt;  &lt;p&gt;The first thing that comes to mind, as a solution for this predicament, is to build an event handler that will set a default value to the fields you need whenever a new item (document) is added to the library.&lt;/p&gt;  &lt;p&gt;An experienced developer will tell you you should use the &lt;strong&gt;ItemAdding&lt;/strong&gt; event, in order to set the default values to the field during the same update that the user initiated, and under his credentials.&lt;/p&gt;  &lt;p&gt;To do that, you will have to use the &lt;strong&gt;properties.AfterProperties[&amp;quot;FieldName&amp;quot;] = “Default Value”;&lt;/strong&gt; to set your value.&lt;/p&gt;  &lt;p&gt;But – you will be surprised that document libraries, although they do support the &lt;strong&gt;ItemAdding&lt;/strong&gt; event, do not support &lt;strong&gt;properties.AfterProperties&lt;/strong&gt; use. This collection is always empty and ignored in document libraries!&lt;/p&gt;  &lt;p&gt;So, the only solution to set a default value to a field in a document library is by using the &lt;strong&gt;ItemAdded&lt;/strong&gt; event.&lt;/p&gt;  &lt;p&gt;During this event, the &lt;strong&gt;SPListItem&lt;/strong&gt; was already created and is accessible through &lt;strong&gt;properties.ListItem&lt;/strong&gt; property (unlike &lt;strong&gt;ItemAdding&lt;/strong&gt;, that happens before the item was created).&lt;/p&gt;  &lt;p&gt;So, setting the field should be rather easy: &lt;strong&gt;properties.ListItem[“FieldName”] = “Default value”;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;But you will have to update the file manually yourself, since this happens after SharePoint has already processed the update of the item.&lt;/p&gt;  &lt;p&gt;Naturally, you will not want to update the modified date/time, modified by user, and also you will not want to create a new version or emails alerts to be sent out.&lt;/p&gt;  &lt;p&gt;So, instead of using the &lt;strong&gt;properties.ListItem.Update()&lt;/strong&gt; method, use these lines of code:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;base&lt;/span&gt;.DisableEventFiring();&lt;br /&gt;properties.ListItem.SystemUpdate(&lt;span style="color: blue"&gt;false&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: blue"&gt;base&lt;/span&gt;.EnableEventFiring();&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Or the SharePoint 2010 code equivalent:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.EventFiringEnabled = &lt;span style="color: blue"&gt;false&lt;/span&gt;;&lt;br /&gt;properties.ListItem.SystemUpdate(&lt;span style="color: blue"&gt;false&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.EventFiringEnabled = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This will allow you to use custom code and programmatically set a default value to any SharePoint library column. Note that the same code should also work for SharePoint Lists, but this is supported through the UI or during the &lt;strong&gt;ItemAdding&lt;/strong&gt; event.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;For those of you who are not developers, or would rather a 3rd party solution, you can use &lt;a href="http://www.kwizcom.com/sharepoint-add-ons/sharepoint-list-forms-extensions-feature/overview/" target="_blank"&gt;KWizCom List Forms Extension solution&lt;/a&gt; version 2.1.60 or higher, where you can find a settings page that allows you to set advanced default values using this workaround.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Thanks, Shai.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-7670309602186409574?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/05/setting-default-value-to-column-in.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-8491298208106931501</guid><pubDate>Tue, 24 May 2011 17:11:00 +0000</pubDate><atom:updated>2011-05-24T10:11:59.869-07:00</atom:updated><title>Recruiting senior developers</title><description>&lt;p&gt;Hi all,&lt;/p&gt;  &lt;p&gt;Just an FYI, KWizCom is recruiting senior SharePoint developers to it’s R&amp;amp;D product development team.&lt;/p&gt;  &lt;p&gt;We are looking for skilled and experienced developers in the greater Toronto area.&lt;/p&gt;  &lt;p&gt;Your experience:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;At least 3 years of developing on Microsoft SharePoint platforms. 2010 experience is an advantage&lt;/li&gt;    &lt;li&gt;required skills: C#, ASP.NET, Javascript, jQuery, AJAX, DHTML, Web services, TFS, XML/CAML&lt;/li&gt;    &lt;li&gt;nice to have: Silverlight, JSON, XSLT, SharePoint Designer, MS Office, workflow foundation, BDC/BCS/BizTalk, Hyper-V&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Your responsibilities:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Work within tight delivery dates&lt;/li&gt;    &lt;li&gt;Work in small, highly professional team&lt;/li&gt;    &lt;li&gt;Be a part of the product lifecycle, attend brainstorming meetings, have a real impact on the product features and UX&lt;/li&gt;    &lt;li&gt;Work in a highly creative environment&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Although there is a work from home option, you will be required to attend meetings at our office, located at Markham Ontario, so we are looking for local candidates.&lt;/p&gt;  &lt;p&gt;If you are up to it and would like to come in for an interview, please email me your CV to shai at kwizcom dot com.&lt;/p&gt;  &lt;p&gt;Thanks!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-8491298208106931501?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/05/recruiting-senior-developers.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-2216658233939126021</guid><pubDate>Fri, 20 May 2011 13:44:00 +0000</pubDate><atom:updated>2011-05-20T06:44:21.165-07:00</atom:updated><title>Promoting user profile changes into local site user profile</title><description>&lt;p&gt;Here is a problem that I faced more then once, with no proper way to resolve it so far…&lt;/p&gt;  &lt;p&gt;User changes his email address or display name in his user profile using his mysite’s profile update page, but the changes are not updated in all the site collections where this user is a member of.&lt;/p&gt;  &lt;p&gt;Display name, email settings – nothing!&lt;/p&gt;  &lt;p&gt;Online doc’s and research says you can use the “STSADM –o sync” command, but it never helped me in those cases where it didn’t work in the first place.&lt;/p&gt;  &lt;p&gt;The only other solution I found was to delete the user from the site collection (which removes all his permissions) and add it again. But this is unacceptable for most users.&lt;/p&gt;  &lt;p&gt;Recently I stumbled upon this tool in codeplex by Berry Cohen:    &lt;br /&gt;&lt;a title="http://userprofilesync.codeplex.com/" href="http://userprofilesync.codeplex.com/"&gt;http://userprofilesync.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;while his code was for SharePoint 2007, I needed it on my 2010 machine, so I upgraded it to 2010 and shared the new build in the codeplex page.&lt;/p&gt;  &lt;p&gt;I have yet to determine if there are any side effects to using this tool, but so far it seems to be working with no problems!&lt;/p&gt;  &lt;p&gt;It actually creates the fields in the user profile list for the site collection, which in turn allows me to even edit and modify it directly there.&lt;/p&gt;  &lt;p&gt;Only note is, for production farms – use with caution! (and also, for production farms if you have that problem I would investigate it rather than using a workaround).&lt;/p&gt;  &lt;p&gt;I was sorry to hear that Berry’s experience with SharePoint was short, and hope to have you back among our lines soon!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-2216658233939126021?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/05/promoting-user-profile-changes-into.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-5579169016024306734</guid><pubDate>Fri, 06 May 2011 22:18:00 +0000</pubDate><atom:updated>2011-05-06T15:21:05.249-07:00</atom:updated><title>PageComponent code example for SharePoint Ribbon</title><description>&lt;p&gt;I get a lot of requests lately to share my example for a simple generic PageComponent JavaScript object (class) that can handle ribbon events.&lt;/p&gt;  &lt;p&gt;The was it works is simple, I will probably blog about it in more details later on but in a nutshell there are 3 client side objects that are involved with the ribbon work on the page:&lt;/p&gt;  &lt;p&gt;1. &lt;strong&gt;PageManager&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;One object that have a collection of all &lt;strong&gt;PageComponent&lt;/strong&gt; objects&lt;strong&gt;&amp;#160;&lt;/strong&gt;for the &lt;strong&gt;CommandDispatcher &lt;/strong&gt;to be able to work with them&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;2. &lt;strong&gt;CommandDispatcher&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The only object that handles ribbon events. Any action that happens on the ribbon sends the &lt;strong&gt;CommandName&lt;/strong&gt; of the associated event to the &lt;strong&gt;CommandDispatcher&lt;/strong&gt;. In turn, the &lt;strong&gt;CommandDispatcher&lt;/strong&gt; goes to all available &lt;strong&gt;PageComponent&lt;/strong&gt; objects and ask each one of them if the can handle that command, and if they do – it asks them to handle the command, thus invoking their command handlers.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;3. Collection of &lt;strong&gt;PageComponent&lt;/strong&gt; objects&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;PageComponent&lt;/strong&gt; object are client side script classes that inherit from &lt;strong&gt;CUI.Page.PageComponent&lt;/strong&gt; (yes, JavaScript class that inherits from a base class!). They declare a collection of &lt;strong&gt;CommandName&lt;/strong&gt; strings of commands they know how to handle and are sometimes associated with a control on the page (web part, field control etc), and when ever such a command is invoked the &lt;strong&gt;CommandDispatcher&lt;/strong&gt; asks them if they can currently handle that command, and if yes – it asks them to handle it. There is no limit to the number of &lt;strong&gt;PageComponent&lt;/strong&gt; objects on the page, or to the number of &lt;strong&gt;PageComponent&lt;/strong&gt; that handles a specific commands. You can also handle commands from OOB ribbon controls, and does not have to be the creator of that ribbon control.      &lt;br /&gt;Note: If a command has no &lt;strong&gt;PageComponent&lt;/strong&gt; that can handle it, the control associated with it will be disabled (button, group) except for a tab that does not have to have a command associated with it.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Here is an example of a page component that I start from, feel free to take it and use it, it is very similar to the example available on MSDN with a bit more explanations:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #006400"&gt;//See documentation in page component: http://msdn.microsoft.com/en-us/library/ff407303.aspx&lt;br /&gt;//TODO: choose namespace like you would in .NET applications. Use company name, project name and module name to avoid conflicts&lt;br /&gt;&lt;/span&gt;Type.registerNamespace(&lt;span style="color: maroon"&gt;'Company.Project.Ribbon.PageComponent'&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #006400"&gt;//Create the object&lt;br /&gt;&lt;/span&gt;Company.Project.Ribbon.PageComponent = &lt;span style="color: blue"&gt;function &lt;/span&gt;(PageComponentId) {&lt;br /&gt;    &lt;span style="color: blue"&gt;this&lt;/span&gt;._pageComponentId = PageComponentId;&lt;span style="color: #006400"&gt;//keep record of associated control (web part, field control, etc..) that is active in this current instance of page component.&lt;br /&gt;    //Initializes the base type CUI.Page.PageComponent (Base class is associated through Type.registerClass(Type, BaseType)&lt;br /&gt;    &lt;/span&gt;Company.Project.Ribbon.PageComponent.initializeBase(&lt;span style="color: blue"&gt;this&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #006400"&gt;//Declate it's prototype&lt;br /&gt;&lt;/span&gt;Company.Project.Ribbon.PageComponent.prototype =&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #006400"&gt;//This will be initialized by caller (web part, field control etc)&lt;br /&gt;    &lt;/span&gt;_pageComponentId: &lt;span style="color: maroon"&gt;&amp;quot;PageComponentIDHolder&amp;quot;&lt;/span&gt;,&lt;br /&gt;&lt;br /&gt;    getId: &lt;span style="color: blue"&gt;function &lt;/span&gt;() {&lt;br /&gt;        &lt;span style="color: blue"&gt;return this&lt;/span&gt;._pageComponentId;&lt;br /&gt;    },&lt;br /&gt;    init: &lt;span style="color: blue"&gt;function &lt;/span&gt;() {&lt;br /&gt;        &lt;span style="color: #006400"&gt;//Create a list of commands that your page component can handle (JSON string array).&lt;br /&gt;        //TODO: edit this collection, these are the command names you wish to handle from the ribbon controls you are listening to.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;._myCommandList = [&lt;span style="color: maroon"&gt;'Company.Project.Ribbon.PageComponent.CMD1'&lt;/span&gt;,&lt;br /&gt;                &lt;span style="color: maroon"&gt;'Company.Project.Ribbon.PageComponent.CMD2'&lt;/span&gt;,&lt;br /&gt;                &lt;span style="color: maroon"&gt;'Company.Project.Ribbon.PageComponent.CMD3'&lt;/span&gt;];&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #006400"&gt;//Create an array of methods used to handle commands passed to the page component.&lt;br /&gt;        //Use Function.createDelegate to keep current class instance (this) when the method is called.&lt;br /&gt;        //TODO: add handler per command in this._myCommandList. Later on - you will have to create the actual script handler method.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;._myHandledCommands = {};&lt;br /&gt;        &lt;span style="color: blue"&gt;this&lt;/span&gt;._myHandledCommands[&lt;span style="color: maroon"&gt;'Company.Project.Ribbon.PageComponent.CMD1'&lt;/span&gt;] = Function.createDelegate(&lt;span style="color: blue"&gt;this&lt;/span&gt;, &lt;span style="color: blue"&gt;this&lt;/span&gt;.CMD1_Handler);&lt;br /&gt;        &lt;span style="color: blue"&gt;this&lt;/span&gt;._myHandledCommands[&lt;span style="color: maroon"&gt;'Company.Project.Ribbon.PageComponent.CMD2'&lt;/span&gt;] = Function.createDelegate(&lt;span style="color: blue"&gt;this&lt;/span&gt;, &lt;span style="color: blue"&gt;this&lt;/span&gt;.NotImplemented);&lt;br /&gt;        &lt;span style="color: blue"&gt;this&lt;/span&gt;._myHandledCommands[&lt;span style="color: maroon"&gt;'Company.Project.Ribbon.PageComponent.CMD3'&lt;/span&gt;] = Function.createDelegate(&lt;span style="color: blue"&gt;this&lt;/span&gt;, &lt;span style="color: blue"&gt;this&lt;/span&gt;.NotImplemented);&lt;br /&gt;    },&lt;br /&gt;    getFocusedCommands: &lt;span style="color: blue"&gt;function &lt;/span&gt;() {&lt;br /&gt;        &lt;span style="color: blue"&gt;return this&lt;/span&gt;._myCommandList; &lt;span style="color: #006400"&gt;//return supported commands collection&lt;br /&gt;    &lt;/span&gt;},&lt;br /&gt;    getGlobalCommands: &lt;span style="color: blue"&gt;function &lt;/span&gt;() {&lt;br /&gt;        &lt;span style="color: blue"&gt;return this&lt;/span&gt;._myCommandList; &lt;span style="color: #006400"&gt;//return supported commands collection&lt;br /&gt;    &lt;/span&gt;},&lt;br /&gt;    canHandleCommand: &lt;span style="color: blue"&gt;function &lt;/span&gt;(commandId) {&lt;br /&gt;        &lt;span style="color: #006400"&gt;//TODO: In our logic, if there is a handler we can handle the command.&lt;br /&gt;        //But you might have more logic here, like: if commandId = DeleteItem - can handle only if there is 1 item selected.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;canHandle = &lt;span style="color: blue"&gt;this&lt;/span&gt;._myHandledCommands[commandId];&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(canHandle)&lt;br /&gt;            &lt;span style="color: blue"&gt;return true&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;else&lt;br /&gt;            return false&lt;/span&gt;;&lt;br /&gt;    },&lt;br /&gt;    handleCommand: &lt;span style="color: blue"&gt;function &lt;/span&gt;(commandId, properties, sequence) {&lt;br /&gt;        &lt;span style="color: #006400"&gt;//Handle the command - simply getting the command handler (delegate) form the hash table and invoking it.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;return this&lt;/span&gt;._myHandledCommands[commandId](commandId, properties, sequence);&lt;br /&gt;    },&lt;br /&gt;    isFocusable: &lt;span style="color: blue"&gt;function &lt;/span&gt;() {&lt;br /&gt;        &lt;span style="color: blue"&gt;return true&lt;/span&gt;;&lt;br /&gt;    },&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #006400"&gt;//=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~&lt;br /&gt;    //=~=~ CUSTOM PAGE COMPONENT LOGIC STARTS HERE ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~&lt;br /&gt;    //=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~&lt;br /&gt;    //    This is where you should add your custom script hadler methods.&lt;br /&gt;    //    TODO: Implement each handler in this._myHandledCommands&lt;br /&gt;    //&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;CMD1_Handler: &lt;span style="color: blue"&gt;function &lt;/span&gt;(commandId, properties, sequence) {&lt;br /&gt;        alert(&lt;span style="color: maroon"&gt;&amp;quot;Handling CMD1_Handler&amp;quot;&lt;/span&gt;);&lt;br /&gt;    },&lt;br /&gt;    NotImplemented: &lt;span style="color: blue"&gt;function &lt;/span&gt;(commandId, properties, sequence) {&lt;br /&gt;        alert(&lt;span style="color: maroon"&gt;&amp;quot;This command was not implemented yet&amp;quot;&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #006400"&gt;//&lt;br /&gt;    //&lt;br /&gt;    //&lt;br /&gt;    //=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~&lt;br /&gt;    //=~=~ CUSTOM PAGE COMPONENT LOGIC ENDS HERE ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~&lt;br /&gt;    //=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #006400"&gt;//This makes our object inherit of CUI.Page.PageComponent&lt;br /&gt;&lt;/span&gt;Company.Project.Ribbon.PageComponent.registerClass(&lt;span style="color: maroon"&gt;'Company.Project.Ribbon.PageComponent'&lt;/span&gt;, CUI.Page.PageComponent)&lt;br /&gt;&lt;span style="color: #006400"&gt;//Execute pending operations waiting for this script to be loaded.&lt;br /&gt;&lt;/span&gt;NotifyScriptLoadedAndExecuteWaitingJobs(&lt;span style="color: maroon"&gt;&amp;quot;Company.Project.Ribbon.PageComponent.js&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So, now that we implemented our PageComponent, all we need is to create an instance and register is with the PageManager using this code that makes sure all JS files were fully loaded:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;function &lt;/span&gt;init2() {&lt;br /&gt;    &lt;span style="color: #006400"&gt;//All JS files were loaded - create instance and register it.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;instance = &lt;span style="color: blue"&gt;new &lt;/span&gt;Company.Project.Ribbon.PageComponent(&lt;span style="color: maroon"&gt;&amp;quot;ComponentID&amp;quot;&lt;/span&gt;);&lt;br /&gt;    SP.Ribbon.PageManager.get_instance().addPageComponent(instance);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;function &lt;/span&gt;init1() {&lt;br /&gt;    &lt;span style="color: #006400"&gt;//Wait for ribbon JS to load&lt;br /&gt;    &lt;/span&gt;ExecuteOrDelayUntilScriptLoaded(init2, &lt;span style="color: maroon"&gt;'sp.ribbon.js'&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: #006400"&gt;//Wait for our JS to load&lt;br /&gt;&lt;/span&gt;ExecuteOrDelayUntilScriptLoaded(init1, &lt;span style="color: maroon"&gt;'Company.Project.Ribbon.PageComponent.js'&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I hope this helps you when you are implementing your custom ribbon solutions, or if you need to handle an existing ribbon command in addition to its OOB logic.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Note: to replace an OOB logic of a ribbon command there are other steps you need to take, I will try blogging about it soon as well.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Thanks, Shai.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-5579169016024306734?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/05/pagecomponent-code-example-for.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>7</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-8012144254308494826</guid><pubDate>Fri, 08 Apr 2011 18:34:00 +0000</pubDate><atom:updated>2011-04-08T11:37:54.984-07:00</atom:updated><title>A little bit about me…</title><description>&lt;p&gt;This is just a little update about my certifications - for those of you who are interested…&lt;/p&gt;&lt;p&gt;On April 1st I have:&lt;/p&gt;&lt;p&gt;1. Renewed my MCT (since 2007)&lt;/p&gt;&lt;p&gt;2. Renewed my MCTS SharePoint to 2010 version (was 2003 before…)&lt;/p&gt;&lt;p&gt;3. Achieved MCPD: SharePoint Developer 2010&lt;/p&gt;&lt;p&gt;4. And I was awarded the MVP: SharePoint Server award!&lt;/p&gt;&lt;p&gt;(Really excited about that last one!)&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/_TWHHFUIBngE/TZ9VLFvi6II/AAAAAAAAALQ/FA4VK8mU1RI/s1600-h/MVP_FullColor_ForScreen_0.35%5B6%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="MVP_FullColor_ForScreen_0.35" border="0" alt="MVP_FullColor_ForScreen_0.35" src="http://lh3.ggpht.com/_TWHHFUIBngE/TZ9VLhm9UrI/AAAAAAAAALU/pqX9sL9Rpus/MVP_FullColor_ForScreen_0.35_thumb%5B4%5D.png?imgmax=800" width="128" height="202" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-8012144254308494826?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/04/little-bit-about-me.html</link><author>noreply@blogger.com (Shai Petel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_TWHHFUIBngE/TZ9VLhm9UrI/AAAAAAAAALU/pqX9sL9Rpus/s72-c/MVP_FullColor_ForScreen_0.35_thumb%5B4%5D.png?imgmax=800" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-8674797078955347059</guid><pubDate>Fri, 25 Mar 2011 14:56:00 +0000</pubDate><atom:updated>2011-03-25T07:56:12.587-07:00</atom:updated><title>FxCop: Properties should not return arrays</title><description>&lt;p&gt;Did you run FxCop and it reported a “Performance” issue regarding “Properties should not return arrays”?&lt;/p&gt;  &lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/0fss9skc(v=VS.100).aspx" href="http://msdn.microsoft.com/en-us/library/0fss9skc(v=VS.100).aspx"&gt;http://msdn.microsoft.com/en-us/library/0fss9skc(v=VS.100).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Well, don’t be in a hurry to fix it just yet.&lt;/p&gt;  &lt;p&gt;Microsoft claims that this may pose a performance issue, since developers “must return a copy of the array”, which will cause a performance issue when accessing this property excessively (like via an indexer, in a loop)&lt;/p&gt;  &lt;p&gt;They go on later to recommend changing this property into a method, to make it clear for the developer who is using it that he is better off calling the method once and storing it in a local member, rather then using the indexer on the property itself, Or change the property type into a collection. There is even an example at the end of the page of converting the array into a collection, which “resolves” this “performance” issue.&lt;/p&gt;  &lt;p&gt;Let me give you a few points to think about before complying to this rule:&lt;/p&gt;  &lt;p&gt;1. Properties do not serve the same purpose as methods. If you need to serialize this class, a property would be serialized while a method would not – resulting in loss of data upon serialization. This is extremely important when talking about web part properties. Even changing the property into a read only collection will not help, as XmlSerializer will throw an exception on that property.&lt;/p&gt;  &lt;p&gt;2. An array does not serve the same functionality as a collection. Especially when reflecting it, or serializing it for use later (JSON serialize / SOAP serialize in web service for example).&lt;/p&gt;  &lt;p&gt;3. If you have an existing web part that uses an array as property, DONT CHANGE IT! you cannot change it’s type, nor change it into a method! Doing so will break all your existing web parts in all pages and you will have to remove them and re-configure them, page by page. This goes to web parts, but also to any serialized content you have of existing code.&lt;/p&gt;  &lt;p&gt;4. Speaking of performance issue, the author assumes that *if* you build the array on every get_Property access this will have negative performance. But – why would you do that? In most you just return a private array member, which does not affect performance at all.&lt;/p&gt;  &lt;p&gt;5. Even more, by implementing the resolution suggested and converting into a collection, performance will have a far worst negative implication! Working with arrays is with no doubt the fastest way of working with a collection in .NET! It is faster than any other collection type, including Generic collections, in every possible way.   &lt;br /&gt;Consider a simple “for” loop, using “items[i]” &amp;lt;—an array will beat any collection any time, any place!&lt;/p&gt;  &lt;p&gt;So, by suggesting to fix a non-existent “performance” issue, you actually cause a much greater real “performance” issue on your application.&lt;/p&gt;  &lt;p&gt;What I don’t understand is, this rule has been there since 2006 with many people posting comments on its validity, Why is it still out there?&lt;/p&gt;  &lt;p&gt;The worst thing about it, with Microsoft SharePoint online hosting, they require your to fix all of these warnings on your code. How can this be a requirement if this is clearly a design consideration and not a clear-cut case of issue to be fixed?&lt;/p&gt;  &lt;p&gt;I would suggest you take any tool (FxCop or any other automated tool) as suggestion only, and use your own discretion on when or if to apply these rules.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-8674797078955347059?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/03/fxcop-properties-should-not-return.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-3337326789257756837</guid><pubDate>Tue, 01 Mar 2011 20:12:00 +0000</pubDate><atom:updated>2011-03-01T12:13:35.398-08:00</atom:updated><title>Parser Error – SharePoint crash after deployment</title><description>&lt;p&gt;Today I run into a strange problem.&lt;/p&gt;  &lt;p&gt;I build a new version of a product and installed it – and it crashed my entire SharePoint:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_TWHHFUIBngE/TW1THS6YGDI/AAAAAAAAALI/0vn5UK4s-nQ/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_TWHHFUIBngE/TW1TH2SnAqI/AAAAAAAAALM/wcpp9SOCmBA/image_thumb%5B2%5D.png?imgmax=800" width="644" height="346" /&gt;&lt;/a&gt; Now, I want to say that this does not happen often, but I fear it does… :)&lt;/p&gt;  &lt;p&gt;The error reads:&lt;/p&gt;  &lt;h4&gt;&lt;i&gt;Parser Error&lt;/i&gt;&lt;/h4&gt; &lt;b&gt;Description: &lt;/b&gt;An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.   &lt;br /&gt;&lt;b&gt;Parser Error Message: &lt;/b&gt;This page has encountered a critical error. Contact your system administrator if this problem persists.  &lt;p&gt;&lt;b&gt;Source Error:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;pre&gt;Line 1:  &amp;lt;%@ Page Inherits=&amp;quot;Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c&amp;quot; %&amp;gt; &amp;lt;%@ Reference VirtualPath=&amp;quot;~TemplatePageUrl&amp;quot; %&amp;gt; &amp;lt;%@ Reference VirtualPath=&amp;quot;~masterurl/custom.master&amp;quot; %&amp;gt;&lt;br /&gt;Line 2:  &amp;lt;html xmlns:mso=&amp;quot;urn:schemas-microsoft-com:office:office&amp;quot; xmlns:msdt=&amp;quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&amp;quot;&amp;gt;&amp;lt;head&amp;gt;&lt;br /&gt;Line 3:  &amp;lt;!--[if gte mso 9]&amp;gt;&amp;lt;xml&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Source File: &lt;/b&gt;/Pages/Default.aspx&lt;b&gt;&amp;#160;&amp;#160;&amp;#160; Line: &lt;/b&gt;1 &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Well, I started investigating this strange error message…&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The weird thing was, all my SharePoint sites reported this error &lt;strong&gt;except&lt;/strong&gt; for central administration – which worked just fine!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;After a short research I noticed in SharePoint Log this strange message, that my web part DLL was throwing an exception that it could not load a referenced file: Microsoft.SharePoint.ApplicationPages.Administration&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Well… this makes sense, since this file only exists in central administration app_bin folder.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Things started to come together. All I had done wrong was to use this dll in my code, since I had some code that was running in central admin (settings page)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Well, as soon as I removed it from my references everything started working again.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now I have to find another way to create a settings page, since GlobalAdminPageBase base class (for central admin settings pages) is something I cannot use.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Either that or I will have to separate my settings page into another DLL (which I prefer not to do)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Well, if you get this error message – be sure to check SharePoint logs and make sure you are not using this dll!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-3337326789257756837?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/03/parser-error-sharepoint-crash-after.html</link><author>noreply@blogger.com (Shai Petel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_TWHHFUIBngE/TW1TH2SnAqI/AAAAAAAAALM/wcpp9SOCmBA/s72-c/image_thumb%5B2%5D.png?imgmax=800" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-7795990404272944358</guid><pubDate>Wed, 23 Feb 2011 18:40:00 +0000</pubDate><atom:updated>2011-02-23T10:40:19.305-08:00</atom:updated><title>List.DefaultView is null ?</title><description>&lt;p&gt;I bet many of you fall for this one… I know I did.&lt;/p&gt;  &lt;p&gt;You got a SPList object, you want to get the default view, or the default view name, so you write:&lt;/p&gt;  &lt;p&gt;list.DefaultView.Title&lt;/p&gt;  &lt;p&gt;You never even bother to check if DefaultView is null or not, right? Because it doesnt make sense…&lt;/p&gt;  &lt;p&gt;Well, I had a customer who did something crazy.&lt;/p&gt;  &lt;p&gt;He created a redirection page inside a list forms folder, and marked it as the default view for the list using SharePoint Designer 2007.&lt;/p&gt;  &lt;p&gt;* You will be glad to hear that in SharePoint Designer 2010 this is not possible anymore :)&lt;/p&gt;  &lt;p&gt;Well, from this point on, calling the list.DefaultView object returns null, which made our code fail since we didn’t think of checking if there is a valid default view for the list.&lt;/p&gt;  &lt;p&gt;So, a lesson to be learned: never trust anyone in SharePoint!&lt;/p&gt;  &lt;p&gt;A quick fix I did for it is to see if list.DefaultView is null, and if so, to loop through all list views and get the first valid view.&lt;/p&gt;  &lt;p&gt;Here is the code I used:&lt;/p&gt; &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;internal static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SPView &lt;/span&gt;GetSafeListDefaultView(&lt;span style="color: #2b91af"&gt;SPList &lt;/span&gt;list, &lt;span style="color: blue"&gt;string &lt;/span&gt;hideViews)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(list.DefaultView != &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;                &lt;span style="color: blue"&gt;return &lt;/span&gt;list.DefaultView;&lt;br /&gt;            &lt;span style="color: blue"&gt;else&lt;/span&gt;&lt;span style="color: green"&gt;&lt;br /&gt;            &lt;/span&gt;{&lt;br /&gt;                &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;SPView &lt;/span&gt;view &lt;span style="color: blue"&gt;in &lt;/span&gt;list.Views)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;br /&gt;                            view.Hidden ||&lt;br /&gt;                            &lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(view.Title.Trim()) ||&lt;br /&gt;                        &lt;span style="color: green"&gt;//Explorer View or subject view in discussion - allow subject views.&lt;br /&gt;                            &lt;/span&gt;(view.BaseViewID == &lt;span style="color: #a31515"&gt;&amp;quot;3&amp;quot; &lt;/span&gt;&amp;amp;&amp;amp; view.ContentTypeId.ToString() == &lt;span style="color: #a31515"&gt;&amp;quot;0x&amp;quot;&lt;/span&gt;) ||&lt;br /&gt;                            (hideViews.IndexOf(&lt;span style="color: #a31515"&gt;&amp;quot;;&amp;quot; &lt;/span&gt;+ view.Title.ToLower() + &lt;span style="color: #a31515"&gt;&amp;quot;;&amp;quot;&lt;/span&gt;) &amp;gt;= 0) ||&lt;br /&gt;                        &lt;span style="color: green"&gt;//reply views in discussion board&lt;br /&gt;                            &lt;/span&gt;(list.BaseTemplate == &lt;span style="color: #2b91af"&gt;SPListTemplateType&lt;/span&gt;.DiscussionBoard &amp;amp;&amp;amp; !view.ContentTypeId.ToString().StartsWith(&lt;span style="color: #a31515"&gt;&amp;quot;0x012001&amp;quot;&lt;/span&gt;))&lt;br /&gt;                        )&lt;br /&gt;                        &lt;span style="color: blue"&gt;continue&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: blue"&gt;return &lt;/span&gt;view;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Exception&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Could not get a safe default view for this list: &amp;quot; &lt;/span&gt;+ list.Title);&lt;br /&gt;        }&lt;/pre&gt;&lt;p&gt;So from now on,&amp;#160; I will use this method to get the list default view, and never again trust the list.DefaultView property, which may be null.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;By the way, the proper way to do what the customer wanted is to change the &lt;strong&gt;list.RootFolder.WelcomePage&lt;/strong&gt; to the redirection page he created. Changing the default view is not the best idea, and I am not sure if it is supported.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Cheers, Shai.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-7795990404272944358?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/02/listdefaultview-is-null.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-2182335931960112865</guid><pubDate>Tue, 22 Feb 2011 22:53:00 +0000</pubDate><atom:updated>2011-02-22T15:24:53.905-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint 2010</category><category domain="http://www.blogger.com/atom/ns#">Undocumented</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Code</category><title>Assembly redirection in OWSTimer</title><description>&lt;p&gt;You may have read my &lt;a href="http://kwizcom.blogspot.com/2010/08/assembly-redirection-in-wsp.html"&gt;older post&lt;/a&gt; on how to add BindingRedirect for assemblies into web.config in SharePoint, which allows you to change the DLL version number of your SharePoint customizations.&lt;/p&gt;  &lt;p&gt;One thing I did not mention was, what if you need to use one of these redirected DLL’s in an SPTimerJob?&lt;/p&gt;  &lt;p&gt;You will notice that assembly BindingRedirect does not apply to OWSTimer.exe, and it will throw errors such as “Could not load file or assembly 'AssmeblyName, Version=1.2.60.0, Culture=neutral, PublicKeyToken=xxxxxxxxx' or one of its dependencies. The system cannot find the file specified”, while you alraedy have a newer version deployed.&lt;/p&gt;  &lt;p&gt;So, how do I make OWSTimer.exe aware of the new version and have my SPTimerJobs running with the latest version every time?&lt;/p&gt;  &lt;h2&gt;First, we need to understand why this doesn’t work.&lt;/h2&gt;  &lt;p&gt;Timer jobs run from OWSTimer.exe file, which is not effected by the web.config settings, so our BindingRedirect in web.config file will not help our code to find the correct assembly when running of the OWSTimer.exe file.&lt;/p&gt;  &lt;h2&gt;Now, for the solution&lt;/h2&gt;  &lt;p&gt;The bad news are that although a WSP natively allows you to add BindingRedirect to your web.config, it does not allow the same for other config files.&lt;/p&gt;  &lt;p&gt;So, we need to do this manually.&lt;/p&gt;  &lt;p&gt;Not to fear though! There is a rather simple way of doing that, still within the WSP with no need to come out of the WSP deployment.&lt;/p&gt;  &lt;p&gt;It is a little know fact, that a farm feature event handler, with the “FeatureInstalled” event will have 2 special effects:&lt;/p&gt;  &lt;p&gt;1. It will run for each web front end server, and not only on one of them&lt;/p&gt;  &lt;p&gt;2. It will allow sufficient access to add files to the SharePoint Root.&lt;/p&gt;  &lt;p&gt;Just make sure you do not edit / remove any of the out of the box files!&lt;/p&gt;  &lt;p&gt;Well, taking this into consideration makes our problem a very simple one to solve.&lt;/p&gt;  &lt;p&gt;We just need to create a config file for OWSTimer.exe and add our BindingRedirect statements there, and that’s it – the OWSTimer will know which version of our DLL to look for.&lt;/p&gt;  &lt;p&gt;Here is a code example on how to add or update 2 BindingRedirect nodes in that config file, the same method can apply to any other config file during WSP deployment stage:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public void &lt;/span&gt;UpdateOWSTimerBindingRedirect()&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;try&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color: blue"&gt;string &lt;/span&gt;configFile = &lt;span style="color: #2b91af"&gt;SPUtility&lt;/span&gt;.GetGenericSetupPath(&lt;span style="color: #a31515"&gt;&amp;quot;TEMPLATE&amp;quot;&lt;/span&gt;).ToLower().Replace(&lt;span style="color: #a31515"&gt;&amp;quot;\\template&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;\\bin&amp;quot;&lt;/span&gt;) + &lt;span style="color: #a31515"&gt;&amp;quot;\\OWSTIMER.EXE.CONFIG&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: green"&gt;//string XMLData = System.IO.File.ReadAllText(configFile, Encoding.UTF8);&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;XmlDocument &lt;/span&gt;config = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;XmlDocument&lt;/span&gt;();&lt;br /&gt;        config.Load(configFile);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green"&gt;//ensure assemblyBinding exists&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;XmlNode &lt;/span&gt;assemblyBinding = config.SelectSingleNode(&lt;span style="color: #a31515"&gt;&amp;quot;configuration/runtime/*[local-name()='assemblyBinding' and namespace-uri()='urn:schemas-microsoft-com:asm.v1']&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(assemblyBinding == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            assemblyBinding = config.CreateNode(&lt;span style="color: #2b91af"&gt;XmlNodeType&lt;/span&gt;.Element, &lt;span style="color: #a31515"&gt;&amp;quot;assemblyBinding&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;urn:schemas-microsoft-com:asm.v1&amp;quot;&lt;/span&gt;);&lt;br /&gt;            config.SelectSingleNode(&lt;span style="color: #a31515"&gt;&amp;quot;configuration/runtime&amp;quot;&lt;/span&gt;).AppendChild(assemblyBinding);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green"&gt;//Delete old entrees if exist&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;XmlElement &lt;/span&gt;current = assemblyBinding.FirstChild &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;XmlElement&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;while &lt;/span&gt;(current != &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;XmlElement &lt;/span&gt;elmToRemove = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(current.FirstChild != &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;var &lt;/span&gt;asmIdn = (current.FirstChild &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;XmlElement&lt;/span&gt;);&lt;br /&gt;                &lt;span style="color: blue"&gt;if &lt;/span&gt;(asmIdn.GetAttribute(&lt;span style="color: #a31515"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;).ToLower().Equals(&lt;span style="color: #a31515"&gt;&amp;quot;kwizcom.sharepoint.foundation&amp;quot;&lt;/span&gt;) ||&lt;br /&gt;                    asmIdn.GetAttribute(&lt;span style="color: #a31515"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;).ToLower().Equals(&lt;span style="color: #a31515"&gt;&amp;quot;kwizcom.foundation&amp;quot;&lt;/span&gt;))&lt;br /&gt;                    elmToRemove = current;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            current = current.NextSibling &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;XmlElement&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(elmToRemove != &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br /&gt;                assemblyBinding.RemoveChild(elmToRemove);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;XmlElement &lt;/span&gt;dependentAssembly = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;span style="color: green"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(dependentAssembly == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;span style="color: green"&gt;//create it&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            dependentAssembly = config.CreateElement(&lt;span style="color: #a31515"&gt;&amp;quot;dependentAssembly&amp;quot;&lt;/span&gt;);&lt;br /&gt;            dependentAssembly.InnerXml = &lt;span style="color: #a31515"&gt;&amp;quot;&amp;lt;assemblyIdentity name=\&amp;quot;KWizCom.SharePoint.Foundation\&amp;quot; publicKeyToken=\&amp;quot;30fb4ddbec95ff8f\&amp;quot; culture=\&amp;quot;neutral\&amp;quot; /&amp;gt;&amp;quot;&lt;/span&gt;+&lt;br /&gt;                                         &lt;span style="color: #a31515"&gt;&amp;quot;&amp;lt;bindingRedirect oldVersion=\&amp;quot;1.0.0.0-20.0.0.00\&amp;quot; newVersion=\&amp;quot;13.2.62.0\&amp;quot; /&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;            assemblyBinding.AppendChild(dependentAssembly);&lt;br /&gt;        }&lt;br /&gt;&lt;span style="color: green"&gt;&lt;br /&gt;        &lt;/span&gt;dependentAssembly = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;span style="color: green"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(dependentAssembly == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;span style="color: green"&gt;//create it&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            dependentAssembly = config.CreateElement(&lt;span style="color: #a31515"&gt;&amp;quot;dependentAssembly&amp;quot;&lt;/span&gt;);&lt;br /&gt;            dependentAssembly.InnerXml = &lt;span style="color: #a31515"&gt;&amp;quot;&amp;lt;assemblyIdentity name=\&amp;quot;KWizCom.Foundation\&amp;quot; publicKeyToken=\&amp;quot;30fb4ddbec95ff8f\&amp;quot; culture=\&amp;quot;neutral\&amp;quot; /&amp;gt;&amp;quot; &lt;/span&gt;+&lt;br /&gt;                                         &lt;span style="color: #a31515"&gt;&amp;quot;&amp;lt;bindingRedirect oldVersion=\&amp;quot;1.0.0.0-20.0.0.00\&amp;quot; newVersion=\&amp;quot;13.2.62.0\&amp;quot; /&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;            assemblyBinding.AppendChild(dependentAssembly);&lt;br /&gt;        }&lt;br /&gt; &lt;span style="color: green"&gt;&lt;br /&gt;        &lt;/span&gt;config.LoadXml(config.OuterXml.Replace(&lt;span style="color: #a31515"&gt;&amp;quot;xmlns=\&amp;quot;\&amp;quot;&amp;quot;&lt;/span&gt;,&lt;span style="color: #a31515"&gt;&amp;quot;&amp;quot;&lt;/span&gt;));&lt;br /&gt;        config.Save(configFile);&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: blue"&gt;catch &lt;/span&gt;{ }&lt;br /&gt;}&lt;/pre&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;Simply call this method during the FeatureInstalled event and update the code with your DLL name and version number, and you are done. &lt;br /&gt;  &lt;br /&gt;Hope this helps you with file versioning on SharePoint, which can be a rather difficult task sometimes.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Thanks, Shai.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-2182335931960112865?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/02/assembly-redirection-in-owstimer.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-3119677635991703205</guid><pubDate>Tue, 15 Feb 2011 17:27:00 +0000</pubDate><atom:updated>2011-02-15T09:42:40.165-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Product Customization</category><category domain="http://www.blogger.com/atom/ns#">Client Code</category><title>Adding print functionality to Data View Web Parts</title><description>Hi,&lt;br /&gt;
A question I got from a customer today was “How can I add a print button to data view web part which will print all documents in the view?”&lt;br /&gt;
&lt;br /&gt;
Well, we have a product called iMUSH Print that allows you to print selected items/document from out of the box list views, and merge them into one PDF file for easy printing.&lt;br /&gt;
&lt;br /&gt;
But the question remains, how do one connects this print functionality to a data view web part?&lt;br /&gt;
&lt;br /&gt;
Well, lists or libraries, the answer is simple and took me about an hour to create a working POC.&lt;br /&gt;
First, lets have a look at out of the box iMUSH print feature in standard library view:&lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/_TWHHFUIBngE/TVq3YpeZCJI/AAAAAAAAAKg/t_7ShQ4ZfB0/s1600-h/image%5B4%5D.png"&gt;&lt;img alt="image" border="0" height="416" src="http://lh5.ggpht.com/_TWHHFUIBngE/TVq3ZBrCMJI/AAAAAAAAAKk/34VAkr29ojM/image_thumb%5B2%5D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;
One thing to note, is that you can either use the checkboxes to select items for printing or click the print menu and select what you wish to print in the popup:&lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/_TWHHFUIBngE/TVq3ZuHZ8cI/AAAAAAAAAKo/aE3yVPVb4ho/s1600-h/image%5B8%5D.png"&gt;&lt;img alt="image" border="0" height="244" src="http://lh6.ggpht.com/_TWHHFUIBngE/TVq3Z1cQ9cI/AAAAAAAAAKs/aTTWEBjKJls/image_thumb%5B4%5D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="image" width="230" /&gt;&lt;/a&gt;&lt;br /&gt;
Ok, so obviously, this popup “knows” how to get a list of items for print. We will use this parameter to send the items form the DVWP.&lt;br /&gt;
Now, to the DVWP in SharePoint Designer:&lt;br /&gt;
2 changes are needed in the DVWP,&lt;br /&gt;
&lt;br /&gt;
1. Add a print button HTML just before the &amp;lt;table&amp;gt; tag of the DVWP items:&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;img&lt;/span&gt; &lt;span style="color: red;"&gt;alt&lt;/span&gt;&lt;span style="color: blue;"&gt;="print"&lt;/span&gt; &lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;="/_layouts/KWizCom_iMushFeature/ico_imush_print_16px.png"&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: red;"&gt;onclick&lt;/span&gt;&lt;span style="color: blue;"&gt;="KWizCom_DoDVWPPrint('/iMUSH/_layouts/KWizCom_iMushFeature/KWizComPrintList.aspx',&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;'567836FC-F9B1-4D48-80AC-D637772703D4', '', this.nextSibling);"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;you will need to replace the url “/iMUSH/” with your real site URL, and the list id ‘5678…’ with your actual list/library GUID.&lt;br /&gt;
&lt;br /&gt;
2. Locate the &amp;lt;tr&amp;gt; tag inside your DVWP items table, and add an “itemid” attribute to it:&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom-color: silver; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: silver; border-left-style: solid; border-left-width: 1px; border-right-color: silver; border-right-style: solid; border-right-width: 1px; border-top-color: silver; border-top-style: solid; border-top-width: 1px; cursor: text; direction: ltr; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 20px; max-height: 200px; overflow-x: auto; overflow-y: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt; &lt;span style="color: red;"&gt;itemid&lt;/span&gt;&lt;span style="color: blue;"&gt;="{@ID}"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
That’s it for the DVWP.&lt;br /&gt;
&lt;br /&gt;
Next you will have to add some javascript code to your page, anywhere in the page.&lt;br /&gt;
My favourite way about it is just adding a content editor web part.&lt;br /&gt;
Just insert this JS code:&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom-color: silver; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: silver; border-left-style: solid; border-left-width: 1px; border-right-color: silver; border-right-style: solid; border-right-width: 1px; border-top-color: silver; border-top-style: solid; border-top-width: 1px; cursor: text; direction: ltr; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 20px; max-height: 200px; overflow-x: auto; overflow-y: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;script&amp;gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt; KWizCom_DoDVWPPrint(pageUrl, listId, viewId, dvwpTable)&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;{&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: blue;"&gt;    var&lt;/span&gt; url = pageUrl + &lt;span style="color: #006080;"&gt;"?ListId="&lt;/span&gt; + listId + &lt;span style="color: #006080;"&gt;"&amp;amp;View="&lt;/span&gt; + viewId + &lt;span style="color: #006080;"&gt;"&amp;amp;ItemId="&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;    &lt;/span&gt;//get items from dvwp&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: blue;"&gt;    var&lt;/span&gt; items = &lt;span style="color: #006080;"&gt;""&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&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; dvwpTable.rows.length; i++)&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: blue;"&gt;   &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue; white-space: pre;"&gt;    &lt;/span&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt;(dvwpTable.rows[i].itemid != undefined)&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;   &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;    &lt;/span&gt;{&lt;/pre&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: blue;"&gt;   &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue; white-space: pre;"&gt;   &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue; white-space: pre;"&gt;    &lt;/span&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt;( items != &lt;span style="color: #006080;"&gt;""&lt;/span&gt; ) items += &lt;span style="color: #006080;"&gt;","&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;   &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;   &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;    &lt;/span&gt;items += dvwpTable.rows[i].itemid;&lt;/pre&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;   &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue; white-space: pre;"&gt;    &lt;/span&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;    &lt;/span&gt;url += items;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;    &lt;/span&gt;commonShowModalDialog(url,&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: #006080;"&gt;'dialogHeight:300px;dialogWidth:180px;scroll:true;toolbar:no;status:no;resizable:yes;'&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span style="color: blue;"&gt;null&lt;/span&gt;, &lt;span style="color: blue;"&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;}&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
and you are done!&lt;br /&gt;
&lt;br /&gt;
Now, you can click print on the DVWP to print all items that are displayed in the web part, even after filtering but the user:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/_TWHHFUIBngE/TVq3aFXzMbI/AAAAAAAAAKw/3WSbF_q4Do4/s1600-h/image%5B13%5D.png"&gt;&lt;br /&gt;
&lt;img alt="image" border="0" src="http://lh3.ggpht.com/_TWHHFUIBngE/TVq3ahSaEmI/AAAAAAAAAK0/aEw4GgsOQes/image_thumb%5B7%5D.png?imgmax=800" title="image"/&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
That’s it!&lt;br /&gt;
&lt;br /&gt;
Just remember, this functionality requires a license for iMUSH Print.&lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-3119677635991703205?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/02/adding-print-functionality-to-data-view.html</link><author>noreply@blogger.com (Shai Petel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_TWHHFUIBngE/TVq3ZBrCMJI/AAAAAAAAAKk/34VAkr29ojM/s72-c/image_thumb%5B2%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-133461837495079451</guid><pubDate>Thu, 03 Feb 2011 18:40:00 +0000</pubDate><atom:updated>2011-03-04T07:31:30.416-08:00</atom:updated><title>Map folder in SharePoint Root</title><description>&lt;p&gt;I am sure many of you needed from time to time to get a local path to a file that was deployed to the SharePoint Root (AKA Hive in 2007 version, AKA “12” folder AKA “14” folder).&lt;/p&gt;&lt;p&gt;For whatever reason you needed to do so, you probably notices that the ASP.NET API (Server.MapPath) or any other ASP.NET method of discovering the local path for a file or folder did not work out as excepted.&lt;/p&gt;&lt;p&gt;Without going into a long explanation on why that did not work, There is a very little documented method that I have used a lot in the past and I have learned not many developer know it.&lt;/p&gt;&lt;p&gt;The SPUtility class contains a static method named “GetGenericSetupPath” that takes one string parameter.&lt;/p&gt;&lt;p&gt;That string parameter can be any folder under the SharePoint Root folder, and the result of the method is the local file system path of that folder.&lt;/p&gt;&lt;p&gt;For example, to get the local path for “Template” folder, use this command:   &lt;br /&gt;
SPUtility.GetGenericSetupPath(&amp;quot;Template&amp;quot;);&lt;/p&gt;&lt;p&gt;But to get the “Layouts” folder, you have to use this command:   &lt;br /&gt;
SPUtility.GetGenericSetupPath(&amp;quot;Template\\LAYOUTS&amp;quot;);&lt;/p&gt;&lt;p&gt;Now, saying that – you have to keep in mind that although you do have read permissions to these folders while inside a SharePoint APP, other permissions (like create file, or create folders) may be blocked.&lt;/p&gt;&lt;p&gt;Cheers,&lt;/p&gt;&lt;p&gt;Shai.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-133461837495079451?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/02/map-folder-in-sharepoint-root.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-6815894195413058729</guid><pubDate>Tue, 01 Feb 2011 13:18:00 +0000</pubDate><atom:updated>2011-02-01T05:18:30.747-08:00</atom:updated><title>How to identify a Ribbon control ID</title><description>&lt;p&gt;A frequent question I get during my “How to develop for the SharePoint Ribbon” session is:&lt;/p&gt;  &lt;p&gt;How can I identify and existing ribbon control or group ID?&lt;/p&gt;  &lt;p&gt;This is useful when you wish to override, hide a control, or insert new controls into an existing group / new groups into an existing tab.&lt;/p&gt;  &lt;p&gt;So, this task is pretty simple once you know this trick:&lt;/p&gt;  &lt;p&gt;First, open a page and make your ribbon control visible:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_TWHHFUIBngE/TUgIG2q2AeI/AAAAAAAAAKI/s3cbsUGKiLs/s1600-h/image%5B2%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_TWHHFUIBngE/TUgIHZnaeQI/AAAAAAAAAKM/LGmx-HaTpJc/image_thumb.png?imgmax=800" width="244" height="85" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Second, use IE developer tool bar to select the ribbon button you want:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_TWHHFUIBngE/TUgIIEQJD6I/AAAAAAAAAKQ/23OJFSY6Gs4/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_TWHHFUIBngE/TUgIIWz_HBI/AAAAAAAAAKU/nJhUYEO-p9I/image_thumb%5B1%5D.png?imgmax=800" width="244" height="242" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Climb up the HTML to the span container, the span ID will have the ribbon control ID:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_TWHHFUIBngE/TUgIIzi_RBI/AAAAAAAAAKY/Ssy13OVhFSk/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_TWHHFUIBngE/TUgIJcwiAqI/AAAAAAAAAKc/mwavRSM7x1k/image_thumb%5B2%5D.png?imgmax=800" width="244" height="49" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In my case, for the wiki page “email a link” here is what we get:&lt;/p&gt;  &lt;p&gt;Ribbon.WikiPageTab.Share-LargeLarge-0-0&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;So, the control ID will be:&lt;/p&gt;  &lt;p&gt;“Ribbon.WikiPageTab.Share”&lt;/p&gt;  &lt;p&gt;And there you go!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-6815894195413058729?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2011/02/how-to-identify-ribbon-control-id.html</link><author>noreply@blogger.com (Shai Petel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_TWHHFUIBngE/TUgIHZnaeQI/AAAAAAAAAKM/LGmx-HaTpJc/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-88387546650961994</guid><pubDate>Tue, 30 Nov 2010 15:33:00 +0000</pubDate><atom:updated>2010-11-30T07:33:00.864-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint 2010</category><category domain="http://www.blogger.com/atom/ns#">Anonymous</category><title>Google Chrome uses IE login information</title><description>&lt;p&gt;Does Google chrome uses IE login settings and information?&lt;/p&gt;  &lt;p&gt;No… that would be crazy, right?&lt;/p&gt;  &lt;p&gt;But – how else would explain this strange behaviour:&lt;/p&gt;  &lt;p&gt;I have a SharePoint site that supports anonymous login. I have IE open and logged in to the site as user A, and in the site the is a tasks list that does not allow anonymous users to view items.&lt;/p&gt;  &lt;p&gt;When I opened chrome and browsed to the site home page – as expected, I was still anonymous to the site. But as soon as I hit the link to the tasks list – it logged me in as user A, without even asking for my credentials!&lt;/p&gt;  &lt;p&gt;So, Google chrome does not ask for login information? Does it share the login information with IE? This is kind of troubling if true, as so far I used several browsers to make sure I get isolated sessions and logins.&lt;/p&gt;  &lt;p&gt;So, I opened IE internet options –&amp;gt; security settings and forced IE to work in anonymous mode only:   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_TWHHFUIBngE/TPUZKlRtMpI/AAAAAAAAAJk/fl4CCG8kZb0/s1600-h/image%5B2%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_TWHHFUIBngE/TPUZK-gW9JI/AAAAAAAAAJo/TLGfWBQGHJA/image_thumb.png?imgmax=800" width="199" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, when I open Chrome and try to access that list it prompts me for user name and password before it logs in.&lt;/p&gt;  &lt;p&gt;Am I the only one surprised?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-88387546650961994?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2010/11/google-chrome-uses-ie-login-information.html</link><author>noreply@blogger.com (Shai Petel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_TWHHFUIBngE/TPUZK-gW9JI/AAAAAAAAAJo/TLGfWBQGHJA/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-1639757883766993451</guid><pubDate>Mon, 22 Nov 2010 17:20:00 +0000</pubDate><atom:updated>2012-01-04T14:58:45.599-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">conference</category><category domain="http://www.blogger.com/atom/ns#">Events</category><category domain="http://www.blogger.com/atom/ns#">SharePoint Saturday</category><category domain="http://www.blogger.com/atom/ns#">presentation</category><title>Speaking Engagements 2011</title><description>&lt;p&gt;My 2011 speaking engagements are posted below,   &lt;br /&gt;If you are around – come see me!    &lt;br /&gt;If you were in one of my sessions, you can find links to the session code and presentation below. Also – if you have any comments on my session – feel free to post it here!    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;    &lt;br /&gt;&lt;strong&gt;January 29 2011&lt;/strong&gt; - SharePoint Saturday Hartford - &lt;a href="http://kwizcom.blogspot.com/2010/07/all-about-sharepoint-ribbon-for.html"&gt;All about the SharePoint Ribbon for developers&lt;/a&gt;     &lt;br /&gt;&lt;strong&gt;January 31, February 2 2011&lt;/strong&gt; - SharePoint Summit 2011 Toronto - &lt;a href="http://kwizcom.blogspot.com/2010/07/all-about-sharepoint-ribbon-for.html"&gt;All about the SharePoint Ribbon for developers&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;February 1 2011&lt;/strong&gt; - SharePoint Summit 2011 Toronto - &lt;a href="http://kwizcom.blogspot.com/2010/08/upgrading-customized-solutions-in.html"&gt;Upgrading customized solutions in SharePoint from 2007 to 2010&lt;/a&gt;     &lt;br /&gt;&lt;strong&gt;April 21 2011&lt;/strong&gt; – Markham .NET user group - &lt;a href="http://kwizcom.blogspot.com/2010/07/all-about-sharepoint-ribbon-for.html"&gt;All about the SharePoint Ribbon for developers&lt;/a&gt;     &lt;br /&gt;&lt;strong&gt;October 29 2011&lt;/strong&gt; – &lt;a href="http://www.sharepointsaturday.org/twincities/default.aspx" target="_blank"&gt;SPS Twin Cities&lt;/a&gt; – Introduction to SharePoint Development using VS2010 and SP2010, &lt;a href="http://kwizcom.blogspot.com/2011/10/developers-guide-how-to-enhance-your.html"&gt;Developer’s guide: how to enhance your SP performance: Understanding caching&lt;/a&gt;    &lt;br /&gt;&lt;strong&gt;November 5 2011&lt;/strong&gt; – &lt;a href="http://www.sharepointsaturday.org/richmond/default.aspx" target="_blank"&gt;SPS Richmond&lt;/a&gt; – &lt;a href="http://kwizcom.blogspot.com/2010/07/all-about-sharepoint-ribbon-for.html"&gt;All about the SharePoint Ribbon for developers&lt;/a&gt;    &lt;br /&gt;&lt;strong&gt;January 7 2012&lt;/strong&gt; – &lt;a href="http://www.sharepointsaturday.org/virginiabeach/default.aspx" target="_blank"&gt;SPS Virginia Beach&lt;/a&gt; – Session unknown… (technically this is a 2012 speaking engagement…) – Cancelled due to other obligations. Sorry I couldn’t make it!&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;See you there!    &lt;br /&gt;( my 2010 speaking engagements page: &lt;a href="http://kwizcom.blogspot.com/2010/08/speaking-engagements.html"&gt;Speaking engagements 2010&lt;/a&gt; )&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-1639757883766993451?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2010/11/speaking-engagements-2011.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-3214844461559662254</guid><pubDate>Mon, 08 Nov 2010 15:07:00 +0000</pubDate><atom:updated>2011-04-15T06:42:46.012-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">Client Code</category><category domain="http://www.blogger.com/atom/ns#">SharePoint 2010</category><category domain="http://www.blogger.com/atom/ns#">Undocumented</category><category domain="http://www.blogger.com/atom/ns#">Developer</category><title>Using jQuery in SharePoint 2010? Here is something you didnt expect!</title><description>If you are planning or using jQuery JS library in SharePoint 2010, there is one thing you didn't plan - for sure.&lt;br /&gt;
The $ sign from jQuery library is conflicted with the $ sign used in SharePoint JS - only in picture library "thumbnails" view.&lt;br /&gt;
Meaning, your code will not work if it has a picture library thumbnail view web part.&lt;br /&gt;
A wrong solution would be to append your JS to the end of the page - do this and your code will work, but the thumbnail view will stop working!&lt;br /&gt;
The solution for this is rather simple and annoying,&lt;br /&gt;
All you have to do is rename the $ sign into something else, like myJQ.&lt;br /&gt;
To do this - add this simple line of code at the end of your jQuery JS file:&lt;br /&gt;
var $jq = jQuery.noConflict();&lt;br /&gt;
and use&amp;nbsp;$jq instead of $.&lt;br /&gt;
Note: you should use your own unique key instead of $jq.&lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-3214844461559662254?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2010/11/using-jquery-in-sharepoint-2010-here-is.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-691739770978360344.post-6500902892673101766</guid><pubDate>Fri, 05 Nov 2010 14:19:00 +0000</pubDate><atom:updated>2010-11-05T07:19:39.963-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Ribbon</category><category domain="http://www.blogger.com/atom/ns#">SharePoint 2010</category><category domain="http://www.blogger.com/atom/ns#">Undocumented</category><title>Custom List Ribbon Button dont show up on home page</title><description>Today I found a strange behaviour,&lt;br /&gt;
My custom list and library ribbon buttons were working find within the list page, but as soon as I added a list view web part to the home page or any other web part page - the custom buttons were gone!&lt;br /&gt;
Only the OOB buttons were available.&lt;br /&gt;
&lt;br /&gt;
After some fishing aroun the code I learned that the list view property "Show Toolbar" had something to do with that. Once I changed it to "Full toolbar" my custom buttons were available!&lt;br /&gt;
&lt;br /&gt;
Strange though, since the other OOB ribbon buttons appear all the time... well, what can you do?&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;div class="blogger-post-footer"&gt;&lt;a href="http://feeds.feedburner.com/KwizcomSharepointBlog"&gt;RSS&lt;/a&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/691739770978360344-6500902892673101766?l=kwizcom.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://kwizcom.blogspot.com/2010/11/custom-list-ribbon-button-dont-show-up.html</link><author>noreply@blogger.com (Shai Petel)</author><thr:total>0</thr:total></item></channel></rss>

