tags:

views:

393

answers:

1

Hello, I have a usercontrol in my ASP.net page. I have a method ProcessData() in my asp.net page.

How do I access ProcessData() method which is in the aspx page from my usercontrol?

Please help

A: 

From your user control, cast this.Page as whatever type your page code behind class is. Then, you should be ale to call the method on that object.

smercer
Also, you want to make sure that your method is public.
smercer
smercer, do you have a sample by any chance??
Try the example at this link a little ways down the page it talks about the need to cast the Page property to the proper derived type...http://aspalliance.com/67
ewrankin
Spot on, ewrankin. The "Specific Parent Page" example is just what you need.
smercer