Enabeling IntelliSense in a Skinfile
Posted by BottOm on September 24, 2007
When working in a skinfile you may have noticed (well, at least I did) that IntelliSense isn’t working.
I found a workaround googling the net and I also found the reason why IntelliSense isn’t enabled by default.
The purpose of a skin-file is that you first create your asp-controls on a page. Then to edit them the way you want and afterwards placing them in a skin-file. The result is that you practically don’t have to type anything in the skinfile and you can use the control with the same style on different pages.
An example:
I first created a label on my homepage.
<asp:Label LabelID=”Label1″ runat=”server” Font-Size=”Medium” ForeColor=”White” Font-Bold=”False” />
Copy and pasted it in the skinfile, changed LabelID to SkinID and gave it a meaningfull name (menuHeader)
<asp:Label SkinID=”menuHeader” runat=”server” Font-Size=”Medium” ForeColor=”White” Font-Bold=”False” />
Back to the page. Add the SkinID to the labels you want the style being applied to.
<asp:Label ID=”lblLogIn” runat=”server” SkinID=”menuHeader” Text=”Login here” />
<asp:Label ID=”Label1″ runat=”server” SkinID=”menuHeader” Text=”Welcome!” />
So that’s it, pretty simple hé?
If you still want to use IntelliSense in a skinfile (which I don’t really advise) use the following solution:
- Go to Tools->Options menu.
- Pick Text Editor -> File Extesion.
- Type skin in Extesion text box.
- Select User Control Editor from Editor dropdown.
- Click Add and then Ok to close dialog and re-open your skin files.
Source: Techphile Blogspot