A
Ahmed
Is it possible for a user control on a webform to access the base class(another
webfrom) of the host page ?
e.g my code does something like this:
ChildPage inherits from ParentPage
and a function in the code behind of a user control hosted on ChildPage does
this
ParentPage p = (ParentPage)this.Page;
p.SomeFunction();
This used to work fine on ASP.NET 1.1 but gives errors on ASP.NET 2.0 beta
2 june ctp. Most probably this is due to the new compilation model. Any solutions
or workaround?
Also is it possile to just access the host page in the code beside of a user
control, something like this:
(based on the above scenario)
ChildPage p = this.Page;
p.SomeOtherFunction();
would asp.net 2.0 complain about this too and if yes how to do something
like this in 2.0 ?
-Ahmed
webfrom) of the host page ?
e.g my code does something like this:
ChildPage inherits from ParentPage
and a function in the code behind of a user control hosted on ChildPage does
this
ParentPage p = (ParentPage)this.Page;
p.SomeFunction();
This used to work fine on ASP.NET 1.1 but gives errors on ASP.NET 2.0 beta
2 june ctp. Most probably this is due to the new compilation model. Any solutions
or workaround?
Also is it possile to just access the host page in the code beside of a user
control, something like this:
(based on the above scenario)
ChildPage p = this.Page;
p.SomeOtherFunction();
would asp.net 2.0 complain about this too and if yes how to do something
like this in 2.0 ?
-Ahmed