views:

307

answers:

1

Working in VS 2008

When working on on ASPX file in Source mode, if i've specified a StyleSheetTheme in the page directive of the file, then Visual Studio will provide me with AutoCompletion lists of the possible skinID values for a control

e.g.

<asp:Button ID="myButton" runat="server" SkinID="
//Having typed this much, I'll get an intellisense with the possible skinid values for this button

I'm just wondering is it possible to get the same functionality in an ASCX. Because theres no stylesheettheme specified for the control, VS doesn't know what the possible values are...

Can you specify a default stylesheet theme that Visual Studio can use for Web User Controls.

+2  A: 

Yes you can. If you specify a default theme in your web.config, then the available skins will also be listed by intellsense in user controls.

To define a default theme, edit the following entry in web.config:

...
<system.web>
 ...
 <pages styleSheetTheme="MyTheme">
 ...

This works for both Themes and StyleSheetThemes. But it may take some time (or a rebuild?) until the available skins are listed by intellisense.

BTW: specifying the theme to be used in web.config (instead of in the pages) has the additional advantage, that you can very easily switch themes.

M4N