Custom Control

Discussion in 'ASP .Net Building Controls' started by Darren, Jul 30, 2003.

  1. Darren

    Darren Guest

    Can someone please help with how to access a generated
    value in a custom control.

    I have an aspx page that contains an ascx (ctl1) control
    which in turn contains several ascx controls (ctl2, ctl3)

    I need to click a button on ascx1 and retrive a value
    from ascx2

    My project is based on the starter kit portal hence the
    structure.

    Any assistance will be appreciated
     
    Darren, Jul 30, 2003
    #1
    1. Advertising

  2. Hi Darren,

    You can use the FindControl method or the Controls property of ctl1 to get a
    reference to ctl2, you will obtain a Control-type, cast it to your
    usercontrol-derived type, and then access any public property or method.

    --
    Victor Garcia Aprea
    Microsoft MVP | ASP.NET
    Looking for insights on ASP.NET? Read my blog:
    http://obies.com/vga/blog.aspx
    To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

    and not by private mail.
    "Darren" <> wrote in message
    news:08e601c3565f$f260d520$...
    > Can someone please help with how to access a generated
    > value in a custom control.
    >
    > I have an aspx page that contains an ascx (ctl1) control
    > which in turn contains several ascx controls (ctl2, ctl3)
    >
    > I need to click a button on ascx1 and retrive a value
    > from ascx2
    >
    > My project is based on the starter kit portal hence the
    > structure.
    >
    > Any assistance will be appreciated
     
    Victor Garcia Aprea [MVP], Aug 4, 2003
    #2
    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. Replies:
    0
    Views:
    723
  2. Jonah Olsson
    Replies:
    1
    Views:
    580
    Scott Allen
    Apr 5, 2005
  3. J R M
    Replies:
    2
    Views:
    434
    Charlie@CBFC
    Jun 1, 2006
  4. Matt Sokol
    Replies:
    2
    Views:
    390
    Theo Tillotson
    Aug 7, 2003
  5. Jonah Olsson
    Replies:
    2
    Views:
    206
    Jonah Olsson
    Apr 5, 2005
Loading...

Share This Page