I want to use the Visual Studio designer to make controls for my WebPart... I've been pointed to two approaches that seem ok. First, SmartParts... which I'll look into later. Second was to create an ASP.NET User Control, and add it explicitly when creating the webpart, similar to figure 5 in this article. This seems like an easy approach to me.

However, I've found I can't add ASP.NET User Controls to my WebPart Solution (the template doesn't appear to be an option). Alternatively, when I try to create a WebApplication, SharePoint templates are not available. So how do I add a User Control that I can modify with the Visual Designer to a SharePoint Web Part project?


So here is a partial answer. However, when I add that GUID to the front or the back of the two pre-existing Project GUIDs already there, I get the error, "This project type is not supported by this installation." If I add it to the middle of the list, it will load... but the ASP.NET User Control template still doesn't appear as an option.

These are the GUIDs already in use by the webpart project...


  • Could you please specify which Visual Studio version/edition you are using. Commented May 6, 2010 at 7:38
  • The ProjectTypeGuids approach is correct for VS 2008. I would double check that you have the correct GUIDs. Commented May 6, 2010 at 8:22
  • I am using VS 2008 and SharePoint 2007... the two GUIDs listed were already in the webpart project. The new one from the article matches one created in a new web application project.
    – Anonymous
    Commented May 6, 2010 at 16:12

3 Answers 3


I think you need to install this


in the documentation they have mentioned about Sandboxed Visual Web Part - A visual Web Part that can be deployed as part of a sandboxed solution.



  • It looks like this targets SharePoint 2010, correct? Our customer will be using only 2007 in the foreseeable future.
    – Anonymous
    Commented May 6, 2010 at 21:03

These are the correct Project Type GUIDs to include the C# ASP.Net project items (such as web user controls).

If you use these then you should be able to add a user control to your project.


  • so those two GUIDs are for Web Applications and Windows, respectively. Mine has an additional GUID {593B0543-81F6-4436-BA1E-4747859CAAE2} for sharepoint apps... So I have all three. While it loads, I can't add items with from the web applications. Just to double check, people can do this with SharePoint 2007 and Visual Studio 2008?
    – Anonymous
    Commented May 6, 2010 at 21:29
  • Yup. If this is VS 2010 then GUIDs may have changed for the project templates. Commented May 8, 2010 at 9:32

The article you are referring to is specific to SharePoint 2010. As your question has been tagged with SharePoint 2007 I assume SP2007 is your target environment.

Bad news, User Controls are not natively supported in SP2007, but as you mention you can take the Smart Part approach. There are some drawbacks to smart parts so you may want to have a good look at the Smart Part code and just take out the bits that deals with loading a user control into a regular SP2007 Web Part.

For more info see 'Dynamically Loading a User Control'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.