johnkainn
asked on
Call aspx.cs from AppCode
Is it possible to call a method in aspx.cs from Class in AppCode?
Hello johnkainn,
I don't think that link applies to you (and it is not best practice either as discussed in the thread).
The simple answer is unfortunately no. Partly because of the reasons indicated in the thread mentioned above. You cannot instantiate the partial class (aspx.cs) without loading the whole page. If you have a function that needs to be used both from a page and from another class then it is better for you to move that function out of the page and into a common class where it can be called from wherever is appropriate.
Regards,
TimCottee
I don't think that link applies to you (and it is not best practice either as discussed in the thread).
The simple answer is unfortunately no. Partly because of the reasons indicated in the thread mentioned above. You cannot instantiate the partial class (aspx.cs) without loading the whole page. If you have a function that needs to be used both from a page and from another class then it is better for you to move that function out of the page and into a common class where it can be called from wherever is appropriate.
Regards,
TimCottee
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.velocityreviews.com/forums/t104413-20-appcode-folder-support-for-codebehind.html
if this is what yolu're talking about, the answer is yes.