adavir
asked on
Visual Studio Intellisense not picking up my WebControls
Hi,
In the current program that Im writing I have several custom web controls.
An example of one of these webcontrols would be the pixeloption control. See the attached code snippit.
The VS intellisense works for the "<pixel:pixeloptiondialog runat="server" id="ppoOptions" autohide="true" >" part perfectly. When I hit "Ctrl + Space" I get a droplist of properties that i can set. However the intellisence does not work for my child controls. So when I hit "Ctrl + Space" I get nothing.
Has anyone any idea how I could get this to work?
Paul
In the current program that Im writing I have several custom web controls.
An example of one of these webcontrols would be the pixeloption control. See the attached code snippit.
The VS intellisense works for the "<pixel:pixeloptiondialog runat="server" id="ppoOptions" autohide="true" >" part perfectly. When I hit "Ctrl + Space" I get a droplist of properties that i can set. However the intellisence does not work for my child controls. So when I hit "Ctrl + Space" I get nothing.
Has anyone any idea how I could get this to work?
Paul
<pixel:pixeloptiondialog runat="server" id="ppoOptions" autohide="true" >
<Options>
<pixel:pixeloption function="Add" label="Add Sub" onclientclick="AddDirectory" />
<pixel:pixeloption function="Edit" label="Rename" onclientclick="RenameDirectory"/>
<pixel:pixeloption function="Delete" onitemclicked="DeleteDirectory" />
</Options>
</pixel:pixeloptiondialog>
I don't quite understand your description. Are you saying the PixelOptionDialog has child controls defined?
ASKER
Just to close this Question, I figured this one out.
I knew that the pixeloptiondialog class had to have the following attributes defined...
[PersistChildren(false),
ParseChildren(true),
ToolboxData("<{0}:PixelBut tonList runat=\"server\"></{0}:Pix elButtonLi st>")]
public class PixelButtonList : WebControl, INamingContainer
but I didnt know that for each child item that you want intellisence to detect you need to have its Persistence mode defined. My Buttons collection is now defined as follows...
[Themeable(false)]
[DefaultValue("")]
[PersistenceMode(Persisten ceMode.Inn erProperty )] <-- This is the key
[Category("Behavior")]
[Description("WebControl_C ommandName ")]
public PixelButtonCollection Options
{
get
{
return _Options;
}
set
{
_Options = value;
}
}
It works a dream! Thanks for your help
I knew that the pixeloptiondialog class had to have the following attributes defined...
[PersistChildren(false),
ParseChildren(true),
ToolboxData("<{0}:PixelBut
public class PixelButtonList : WebControl, INamingContainer
but I didnt know that for each child item that you want intellisence to detect you need to have its Persistence mode defined. My Buttons collection is now defined as follows...
[Themeable(false)]
[DefaultValue("")]
[PersistenceMode(Persisten
[Category("Behavior")]
[Description("WebControl_C
public PixelButtonCollection Options
{
get
{
return _Options;
}
set
{
_Options = value;
}
}
It works a dream! Thanks for your help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
There is plenty of information in the question, there is no shame in not knowing the answer.
Sorry I didnt respond to your initial comment, i figured you couldnt help me as you asked...
"Are you saying the PixelOptionDialog has child controls defined?" of course it does, look at the Code Snippit. You can see that I have a PixelOption collection. The key to answering the question was reading the line "the intellisence does not work for my child controls."
thanks for your help
Sorry I didnt respond to your initial comment, i figured you couldnt help me as you asked...
"Are you saying the PixelOptionDialog has child controls defined?" of course it does, look at the Code Snippit. You can see that I have a PixelOption collection. The key to answering the question was reading the line "the intellisence does not work for my child controls."
thanks for your help