user control property

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
 
A

AW

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
 
S

Steph

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
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top