I have the following (simplified slightly) at the top of my application page in SharePoint:

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %> 
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %> 
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %> 
<%@ Register TagPrefix="wssuc" TagName="SchedulePicker" src="~/_controltemplates/SchedulePicker.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderMain" runat="server" >

I am working in a folder that is not inside the 12 hive. I would like to get intellisense when typing. For example if I type:

<Sh... I get Intellinsense

I would like to be able to get intellisense on the user controls. so when I type

<wss... I will get intellisense

I know that Visual Studio can't find the location of the usercontrols and that is the reason. Ideally like to find something similar to importing the wss.xsd that will work with usercontrols. Any ideas, I am using WSS 3 and Visual Studio 2008. If I have to resort to making my own .xsd then fine.


OK here is what I got so far...

I created a class library project and put in the following code:

Option Strict On
Option Explicit On

Public Class InputFormSection
    Inherits Microsoft.SharePoint.WebControls.InputFormSection

End Class

I removed the default Root namespace from Visual Studio (VB.Net only), strong named, added references and placed the assembly in the GAC. Next, I placed the following line at the top of my application page:

<%@ Register Tagprefix="wssuc" Namespace="" Assembly="ClassLibrary1, Version=, Culture=neutral, PublicKeyToken=c57cbc1c9abd0f4f" %>

Now in my content placeholder I get Intellisense when I type:

<wssuc:InputFormSection ...

Up pops Collapsed, Collapsible, Description, EnableTheming, Etc. It even pops up Template_Description, Template_InputFormControls, Template_Title in between the parent InputFormSection tag.

Note that I am not saying that this works totally (or is the best solution), there are other properties that do not get picked up in Intellisense (E.G. SkinId). But I thought if I threw my idea out, someone will come back with a good idea. Comments and ideas are most welcome.


I've occasionally seen this. Another symptom is you don't have outlining (the plus symbols next to blocks of code that let you collapse the code).

One of the ways I've seen sort this is by right clicking the ascx in Solution Explorer and clicking Open With... and selecting 'Web Form (With Encoding)'.

I've also seen Visual Studio extensions sometimes fall over, causing these symptoms and requires restarting VS to sort.

Also doing a full rebuild & redeploy of the solution from within VS can sometimes bring IntelliSense back.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.