Accessing property of User Control

Discussion in 'ASP .Net' started by KK, Apr 8, 2004.

  1. KK

    KK Guest

    Hello,

    I´m new to ASP.NET and I'm trying to solve this problem:

    I want to have two checkboxes and a submit button in my user control. This
    user control will also have one public read-only propery (called e.g.
    "Number") which will be "1" if both checkboxes will be checked and "0"
    otherwise. This user control will be included in some webpage, that will
    have one additional Label and nothing else.

    Is it possible to write "1" or "0" to the Label depending on what user
    checked in user control? I tried to "calculate" my property "Number" in
    SubmitButton.Clicked event and read this property in Page.Load event but it
    looks like this event executes before UserControl.SubmitButton.Clicked.

    The only solution that I can see now is to move the button from the user
    control to the page - than it should work. Is there any other solution?

    Thanks Borek.
    KK, Apr 8, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mad Scientist Jr
    Replies:
    0
    Views:
    626
    Mad Scientist Jr
    Mar 22, 2006
  2. David Hearn
    Replies:
    6
    Views:
    327
    David Hearn
    May 4, 2006
  3. GregStevensCA
    Replies:
    0
    Views:
    352
    GregStevensCA
    Nov 10, 2006
  4. johnStein

    Accessing the visible property of a User Control at runtime

    johnStein, May 24, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    166
    Calvin Luttrell/ProjectThunder.com
    May 24, 2004
  5. Kiran More
    Replies:
    2
    Views:
    306
    Kiran More
    Nov 14, 2006
Loading...

Share This Page