Back from vacation. 1 week with an offline version of feeds is hard. So I read the postings I got closely 🙂 One post I do want to bring your attention to, is about SharePoint Controls.
My post about using the SharePoint Controls shows how to use the controls you see in forms (TextField, NumberField, LookupField…).
There are plenty of SharePoint controls, which you can use. Robin Meure has written a post “re-using SharePoint controls”.
Using AJAX or Silverlight from within SharePoint in Webparts requires you to modify the web.config to support the technology. I don’t mention that you have to install the .NET Framework 3.5 SP1 and Silverlight to be able to use it…
Instead of changing the web.config manually (.NET Framework 3.5 AJAX und Silverlight in SharePoint registrieren von Fabian Moritz), you can use my features. They do all the necessary changes for you.
An SPQuery for lookup columns should be easy. Start the famous U2U Caml Editor, configure your query, and query the list. This query will get a result if the lookup column stores something like “1;#1”. But if its value is e.g. “1;#Title”, the query will not return an item. So what can we do about it? Add a LookupId=’TRUE’ to your query, so it will look like this: <Where> <Eq> <FieldRef Name='LookupField' LookupId='TRUE'/> <Value Type='Lookup'>2</Value> </Eq> </Where> Remember to omit the Query tags from the U2U Caml Editor when pasting the query into your Visual Studio source code!
My SharePointConsole has some new commands.
If you don’t know it, it is a command line utility which allows you to perform some common tasks. Currently the theese commands are implemented:
EnumContentTypes CreateContentType RenameContentType DeleteContentType DeleteAllListItems ShowInNewForm ShowInEditForm ShowInDisplayForm DeleteAllVersions RecycleAllVersions SetTitleWithFilename SetSearchCenterUrl SystemUpdate FeatureManager EmptyRecycleBin Download the SharePointConsole
The Wiki functionality SharePoint offers is great for quickly writing down stuff. It is often used for Server documentation.
Creating new pages is easy, and you can link pages. The ability to format the text is nothing fancy, but most of the time enough 🙂
Uploading images can be done with my custom field type, which stores images and documents in existing libraries. After the upload, a link is inserted into the Wiki body.
Microsoft has released a new version of the SharePoint SDK. Go and grab it 🙂
WSS 3.0 SDK Office SharePoint Server 2007 SDK So what is new in the release?
WSS
Expanded documentation of backup and restore features Complete documentation of Microsoft.SharePoint.Administration.Backup New documentation of the administrative object model Revised Web Part documentation More migration support Expanded and updated reference documentation MOSS
Custom Federated Search Web Part with a Credentials UI Federated Search SQL Server Connector Federated Search HTML to RSS Connector Federated Search Virtual Earth Map Connector
This post is a follow up for my post “ Get default page Url”.
When you access an SPWeb through a URL in your browser, you will be redirected to the default page like home.aspx.
Each SPWeb has a RootFolder. And this SPFolder has a property “WelcomePage”. This property stores the relative path to the default page like “wiki pages/home.aspx”. 1: SPContext.Current.Web.RootFolder.WelcomePage
The Best Practice MSDN page has some interesting hints to generate better code. In this post I write about some point of that article, provide samples and fix bugs which are in the MSDN article.
Caching You should only cache thread safe objects. What’s that?
This means, that you should only cache objects, which can not be changed from the outside of your code. An itemCollection (as list.Items) is changed, if another user adds an item.
For months the Webpart could be installed through a solution/feature without any problems. Then I had to change something in the code. When I tried to upgrade the solution to see the changes, the Webpart could not be added to a page anymore.
The assembly is deployed to the GAC through the solution. It has been upgraded.
Looking at the xml file in my solution did not show any errors.
By now most of you should know that there is a SharePoint Diagnostics Tool. This really is a great tool, since it scans your assemblies for memory leaks.
You should also know, that there is an occasion you can create a memory leak which the tool will not recognize. 1: using (var site = new SPSite(“http://yoururl”))
<span class=lnum> 2: </span>{ 3: SPWeb web = null; <span class=lnum> 4: </span> <span class=kwrd>try</span> 5: { <span class=lnum> 6: </span> web = site.