aarebrot.net Frode's blog on Sharepoint and other stuff

Slide deck and demos from yesterdays presentation

Posted on May 12, 2011
VN:F [1.9.22_1171]
Rating: 4.5/5 (2 votes cast)

Thanks to everyone who showed up at yesterdays event. This was my first public presentation and based on the feedback I guess I did good. I hope you enjoyed the content, and that you learned something in the process. I'll be out of the country for the next 2 weeks, but you're welcome to tweet/email me questions and comments if you have any. I'll try and get back to you as soon as I can.

You can find the slides from my presentation at the bottom of this post, along with the Visual Studio solutions for the three demos that I did. These are the actual demos that I created during the presentation, complete with grammar mistakes and everything, so you should be looking at the same thing that you saw then. You'll need a dev machine setup with SharePoint 2010 and Visual Studio 2010 to be able to try these out.

As a last note, I should give credit where credit is due. The fourth slide in my presentation was borrowed from Eric Shupps' TechEd 2010 presentation.

Changing the properties of an existing Web Part using PowerShell

Posted on September 2, 2010
VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)

Sometimes you need to change the properties of a Web Part without browsing to the page itself and set it. There could be numerous reasons as to why you would want or need to do this. A while back I created a really simple redirect web part for one of my clients. It had two custom properties, EnableRedirect and Url. If EnableRedirect was true, it would redirect the user to the specified Url. Obviously, if you want to change either of these properties while the EnableRedirect is true, that's going to be a problem.

Fast forward and the redirect web parts need to be changed and/or disabled. Obviously we can't navigate to the page and just change it, because the page will redirect you. But it can be done relatively easy using PowerShell.

How to get a value from a form

Posted on November 24, 2008
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

This may be pretty obvious to more seasoned C# web developers, but if you're fresh with web part development (like me) this may come in handy.

Loading custom web parts inside your Onet.xml

Posted on November 5, 2008
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

How would you go about adding a custom built web part to a page in a site definition? MSDN shows an example using the <AllUsersWebPart> tag in the <module> section of a site definitions onet.xml file. Inside there is a CDATA area where it uses some more (presumably) XML to define and configure the web part. You can check out the example here: MSDN's AllWebUsersWebPart page. I had some issues adapting this to my own custom built web parts, which made me come up with the solution in this article instead.

Finding the Base Permissions of a user

Posted on November 3, 2008
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Lately I've been working on a re-direct web part for a client. The web part should redirect the users immediately (preferably without them noticing it), and therefore a 5 second countdown is not an ideal way to go (also one of the reasons we're not just using a redirect page layout). One of the issues I came across was, if the web part redirects immediately, how do you ever go in and change the settings easily?