Hi, guys
I need my UserControl to communicate with the Page nesting it. I need the UserControl to call a method of it's Page, to be more precise. To do that, I try to get a reference to the Page and cast it to my page type. I mean, suppose my page's class is "public partial class myPage". Then, inside the userControl, I write something like:
((myPage)Page).pageMethod();
The problem is that it doesn't compile, and says that "The type or namespace 'myPage' could not be found". I never before tried to reference a class that wasn't inside the App_Code folder, or in a ClassLibrary. How can I do that?
Note: I know that UserControls are meant to be reused, and shouldn't need a specific page to work. This is not the best design choice, but in this particular case, will work perfectly for me.
Thanks in advance!
...
Go to the complete details ...