Partial Classes and Control Declarations

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.
 
K

KJ

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;
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top