Component Class

  • Thread starter Thread starter Shawn B.
  • Start date Start date
S

Shawn B.

Greetings,

If I drop more than one component (custom component) onto a WebForm, is
there a way (inside the Component) to identify the instance of the class?
For example, Most controls/components have a Name/ID property but there
seems not to be one for the Component except in the property editor.


Thanks,
Shawn
 
The Name property is a kind of "virtual" property added by the designer. As
for Windows Forms, there is a way for a component to obtain an Extender
interface to get access to advanced goodies like the "Name" property and
also extend other components with some custom property (the ToolTip control
does just that). Not sure this is possible with the Web Forms designer.

However, it is usually enough to compare HashCodes if you just want to
distinguish between two instances of the class.
 
Back
Top