Partial Classes and Control Declarations

  • Thread starter Thread starter GMartin
  • Start date Start date
G

GMartin

I'm having a problem with being unable to access the Declarations for
Controls.

In a UserControl, what I'm trying to do is make certain controls
Public, so I can access them from the page that instantiates the
UserControl. That way, I don't have to write new properties on the
User Control to expose functionality of controls I want to use.

Is there a way we can view the Partial Classes where the Control
Delcarations are made? In Version 1.1 we used to be able to go in
there and declare these things as public.
 
You can expose any webcontrol in your user control as a declared public
property of that user control. For example:

public Label TheLabel
{
get
{
return this.Label1;
}
}
 
Back
Top