user control property

  • Thread starter Thread starter Steph
  • Start date Start date
S

Steph

Hello,

I have an user control with any public propertys.

I wand set up propertys directlly in a code behind of a page where he will
be put in, and not directly in the aspx page. How can I refer this us in my
cs page ?

thanks for your help

Steph
 
I have an user control with any public propertys.
I wand set up propertys directlly in a code behind of a page where he will
be put in, and not directly in the aspx page. How can I refer this us in my
cs page ?

You just address it like any other control. Example:
myControl1.Text="Hello"

Now, the problem is that if it is a USER control (not a custom control),
Visual Studio.net doesn't add it to the codebehind declarations.

So after the other controls' declarations, add a line like:
Protected myControl1 as myControl
 
Ok, thanks :-)

Steph


AW said:
You just address it like any other control. Example:
myControl1.Text="Hello"

Now, the problem is that if it is a USER control (not a custom control),
Visual Studio.net doesn't add it to the codebehind declarations.

So after the other controls' declarations, add a line like:
Protected myControl1 as myControl
 
Back
Top