ASP.NET - how to get the properties of a component?

  • Thread starter =?ISO-8859-1?Q?Mika=EBl_PLOUHINEC?=
  • Start date
?

=?ISO-8859-1?Q?Mika=EBl_PLOUHINEC?=

Hello,

I work in a ASP.NET (C#) project. I would like to create an user control
with a label and a textBox.

My component myTextBox.ascx is present in my page (aspx) with
<toto:TextBoxPerso ID="TextBoxPerso1" runat="server" /><br />

So I would like to manage the component of my component for example in
the code of my aspx page.

I find I can do that with
((Label)(this.TextBoxPerso1.FindControl("label"))).Text = "Label 2";

But is there a way to "publish" several properties of my component in
order to access to this like
this.TextBoxPerso1.getLabel().Text = "label 2";

Thanks a lot.

Mike.
 

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,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top