1

I have a global.asax in which I define some variables that I want to be available throughout the application, such as a class to handle certain database requests. In an aspx page, I can access these variables/objects using for example in Visual Basic:

dim dataMan as clsData = application.get("dataGofer")

My question: is it possible to call this from a generic handler (.ashx file)? If so, can you please show me a code snippet? Thanks!

Fritz45
  • 752
  • 1
  • 10
  • 23

1 Answers1

2

You have Context parameter of ProcessRequest method through which you can access the page objects.

Dim value=context.Application.Get("key")
KV Prajapati
  • 93,659
  • 19
  • 148
  • 186