how to access user web control from parent page?

C

Chris

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
 
P

Peter Zolja

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)
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top