Getting the ApplicationInstance in webcontrol? Help

N

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
 
B

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top