Home All Groups Group Topic Archive Search About

Getting the ApplicationInstance in webcontrol? Help

Author
13 Jun 2005 7:24 AM
Nigil LaVey
Hi guys,

I have been having issues getting the Global ApplicationInstance in
webcontrol....
within my global.asax, I have a public method test(). now how do I access
them in a webcontrol....
normally I just using
((MyGobal.Class)HttpContext.ApplicationInstance).test();

pls advise,
schizo

Author
13 Jun 2005 1:21 PM
Brock Allen
If the Application class is in the same assembly as the Codebehind for the
control, then it should work. If the control is a different assembly, then
you'll need to make a reference from the control assembly to the assembly
that contains the application class. Chances are that this will be a bit
tricky, since typically the control's assembly is compiled prior to the application's
assembly.

-Brock
DevelopMentor
http://staff.develop.com/ballen



Show quoteHide quote
> Hi guys,
>
> I have been having issues getting the Global ApplicationInstance in
> webcontrol....
> within my global.asax, I have a public method test(). now how do I
> access
> them in a webcontrol....
> normally I just using
> ((MyGobal.Class)HttpContext.ApplicationInstance).test();
> pls advise,
> schizo