Visual Studio Web Developer Tutorial Corner

Creating a vs webpage? Need some help?

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:

  1. Go to Tools->Options menu.
  2. Pick Text Editor -> File Extesion.
  3. Type skin in Extesion text box.
  4. Select User Control Editor from Editor dropdown.
  5. Click Add and then Ok to close dialog and re-open your skin files.

Source: Techphile Blogspot

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>