Using the ListView Control in SharePoint 2010 Beta

by Christian Fredh 24. February 2010 02:57

In SharePoint 2007 you had to modify the web.config file, manually or with a feature, to enable the ScriptManager, ListView and other features in ASP.NET 3.5.

SharePoint 2010 is built on ASP.NET 3.5 so it should just work. However, the namespace for the ListView control is not mapped in the web.config or in the SharePoint Project Item templates by default. If you do not register the the namespace you will see the "Unknown server tag 'asp:ListView'" error message if you for instance use it in a web part:


To fix it add this line to the <controls>-section under <system.web> and <pages>:

<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

Or register the namespace in the .ascx or .aspx file:

<%@ Register Assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>

And it should work:

Hopefully they will add both before RTM.

Tags: , ,

SharePoint | SharePoint 2010

SharePoint 2010 Development Environment Options

by Christian Fredh 4. November 2009 08:25

Great news for developers targeting SharePoint 2010 at the SharePoint Conference 2009. Many exiting features and tools, one of them being that SharePoint 2010 is installable on Windows 7 (and Vista), which means that SharePoint development is now supported on the client. This is a huge deal, since SharePoint development becomes more mainstream and easier to get started with.

Having SharePoint installed on the client is also good for demos. It is not supported for production environments.

Since SharePoint 2010 only support 64-bit operating system, this also applies if installing on Windows 7, you have to have the 64-bit versions. Since Windows Virtual PC doesn’t support 64-bit operating systems and Microsoft Virtual PC 2007 cannot be installed on Windows 7, using VPC is no longer an option – which is a good thing.

Basically, you are down to three different options when developing on the client, all with pros and cons.

On the Metal

SharePoint installed on your regular Windows 7 environment.


  • You can use all the hardware on your computer with no additional work, including networking. This means better performance and fewer problems with VPN connections.
  • You can use your other applications like Outlook and browsers at the same time with convenience.
  • You can start up SharePoint when developing and shut it down again when not using it, with simple PowerShell scripts. I will provide this scripts as a separate blog post.


  • If you are like me, switching between different projects a lot, it might take some thought to set them up on the same environment. Writing PowerShell scripts to set up environment and data for different projects could probably help with this.
  • If the SharePoint install gets messed up, it might take some time to solve, although I think it will be a lot easier in this version.

Bootable VHD

In Windows 7 you set up a bootable virtual hard drive with the SharePoint environment. When the computer is booting up, you choose to boot from the VHD where SharePoint is installed.


  • You can use all the hardware on your computer with no additional work, including networking. This means better performance and fewer problems with VPN connections.
  • You cannot use different VHDs for different projects with ease.
  • If you need a fresh install, just throw the VHD away and replace it with a backup with the fresh install.


  • You cannot use your regular applications when developing, and a restart is needed if you would like to switch to your regular environment. Of course, you can install as many applications as you which on the VHD, but it would need some work to keep it synchronized if that is preferable.


Using Windows Server 2008 R2 with Hyper-V on VHD, or if you use it as your base operating system, and then set up the SharePoint environment on one or more VHDs with Hyper-V.


  • Supports advanced scenarios with multiple servers and environments.
  • Your tests will be run in a realistic environment.


  • Takes time to set up, especially if your not used to Hyper-V.
  • As with the bootable VHD options you are not in your regular environment and don’t have your regular applications available. If you use Hyper-V to run your regular environment you would be able to switch faster, but that is probably not a common scenario.

Personally, I will try to use the On the Metal option, because I think it’s such a huge win to be able to work in your regular environment, and try to solve issues with different projects and SharePoint installment issues with PowerShell scripts, for setting up project environment and resetting the installation.

In later posts I will dig deeper on how to set up these environments.

Tags: , ,

SharePoint | SharePoint 2010

Powered by BlogEngine.NET
Theme by Mads Kristensen

About Christian Fredh

Christian Fredh

A twenty six year old solutions architect and developer living in Stockholm, Sweden. I work as a SharePoint consultant at Avega Group with .NET and SharePoint development.


The opinions expressed herein are my own personal opinions and do not represent my employer's view. Use the information on this site at your own risk.


Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

© Copyright 2009, Christian Fredh.