A New Internet Library: Add Your Website/Blog or Suggest A Website/Blog to our Free Web Directory http://anil.myfunda.net.

Its very simple, free and SEO Friendly.
Submit Now....

Tuesday, July 22, 2008

Is it possible to create a copy of the page object?

I'm creating a background thread in an ascx page.

The background thread needs to generate an image. The only way to create this image is to ask a control to generate it. This control can only work on a page. It needs mappath, the current user, and the like - all from the page.

I can't just pass in the background thread the existing page. First, the page may have finished its lifecycle before the background thread tries to access it. Second, Page is not thread safe (except for static methods).

 This means that I need to somehow make a copy of page and if possible, mimic the lifecycle. I need to maintain all the information that hte control needs, such as page.Server. Is this possible? If so, how do I do it?



Read Full article Here.

No comments:

Post a Comment

Post your comments here:

Originals Enjoy