Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


SkinID Property in Custom Control

Posted on 2007-07-19
Medium Priority
Last Modified: 2013-11-07
I am trying to create a custom server control that inherits from Web.UI.Control (not WebControl).  SkinID is available in the base object, however it is not exposed in the custom control.  I've even tried exposing the property by just overriding the property:

Public Overrides Property SkinID() As String
   Return MyBase.SkinID
 End Get
 Set(ByVal value As String)
   MyBase.SkinID = value
 End Set
End Property

But this still does not expose the property.  How do get this property to appear in the designer and even opens the dialog too like?
Question by:Webtologist
  • 2

Accepted Solution

smolam earned 1000 total points
ID: 19527447
If you add the Browsable option to your property that should work.

<Browsable(True)> _
Public Overrides Property SkinID() As String

If you aren't already doing it you will have to import the System.ComponenModel Namespace.


Author Comment

ID: 19528654
Thank you, that works fine.  

Now I get this error:

The SkinID value is not defined the theme or stylesheet theme

I do have a theme assigned to the page and I can assign it to another standard web control.

Expert Comment

ID: 19528758

Usually you should be opening up another question for this as you are depriving someone of points...

But you need to create a new Skin for your new custom control because the tags won't match anymore.

ie your standard control is for example

your new one will be <cc:CustomControl

So you can't use the same Skin for a CustomControl that you do for a Standard Control.



Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question