how to access user web control from parent page?

Discussion in 'ASP .Net Building Controls' started by Chris, Sep 28, 2005.

  1. Chris

    Chris Guest

    Hi,

    I've created a user web control with 4 drop down list boxes in it.

    I've added this user control to my main web form page.

    I created the references to it in the class constructor:

    protected System.Web.UI.UserControl ReportLocationSelector;


    in the code behind page for the main webpage how do I programatically gain
    access to the reportlocationselector controls methods, properties and events.

    this.reportlocationselector.?

    thanks

    Chris
    Chris, Sep 28, 2005
    #1
    1. Advertising

  2. Chris

    Peter Zolja Guest

    > protected System.Web.UI.UserControl ReportLocationSelector;

    It may be that I don't understand exactly what your situation, but shouldn't
    that be?

    protected MyControlClassName ReportLocationSelector;

    -- to access a property: ReportLocationSelector.SomeProperty = SomeValue;

    If you added the control using VS you should not have to do this (of course
    it depends on how/what you did)
    Peter Zolja, Sep 29, 2005
    #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. Reny J Joseph Thuthikattu
    Replies:
    1
    Views:
    532
    =?Utf-8?B?UHJha2FzaC5ORVQ=?=
    Dec 30, 2004
  2. =?Utf-8?B?UmFlZCBTYXdhbGhh?=

    Access User Control DataGrid Controls from parent page

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Feb 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    853
    IPGrunt
    Feb 16, 2005
  3. Steve Richter
    Replies:
    5
    Views:
    6,393
    Brock Allen
    Apr 5, 2005
  4. Steve Kershaw
    Replies:
    1
    Views:
    3,647
    Peter Rilling
    Dec 7, 2005
  5. dliu
    Replies:
    0
    Views:
    1,092
Loading...

Share This Page