IHttpHandler persistence

  • Thread starter MrGiga (Robb Sadler)
  • Start date
M

MrGiga (Robb Sadler)

I am using an IHttpHandler to provide several media items for a page. The
items to provide all can be retrieved from one DB query and yet are not
serially located (they are dispersed throughout page in different places).
Because of this I would love to have the page instantiate my IHttpHandler
class and have it persist throughout the building of the page, but I cannot
have it persist beyond that.

Is it possible to have the control instantiate at the beginning of the page
and not be used for any other page and then be disposed of at the end of the
build? I have decided that the answer is no based on what I could gather from
MSDN and web searches, since IsReusable does not provide a clear enough
answer to the overall "Where should it be reused?" question. Is there a way
to implement this and guarantee the persistence and disposal of the control
class when it should be done? Because I have not found an answer to this
question, I am basically divvying up the task between PageLoad and the
IHttpHandler, storing the needed data in the session info and that will work
OK. Just wondered if any of you all had a cleaner idea...

Thanks in advance!

Robb
 

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,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top