Last post Sep 05, 2007 08:32 PM by ddjs
Aug 27, 2007 07:52 PM|ddjs|LINK
Is it possible to create custom server controls on the fly?
I need a way to programatically output a control before the request handler finishes executing.
Preferably in a HttpModule or HttpHandler as I don't have direct access to any Pages.
Any ideas/help greatly appreciated.
Aug 28, 2007 04:18 AM|rstrahl|LINK
Not really. You need to be within the context of a Page in order to add anything to it. Which means you have to use a handler subclassed from Page.
Sep 05, 2007 07:42 PM|ddjs|LINK
Scott Guthrie wrote about a method to programmatically inject the output of user controls outside of a Page.
Not a server control, but just about if not more useful.
Here's the link:
Sep 05, 2007 07:46 PM|pbromberg|LINK
I'm reading the other responses to your post and it becomes clear that you need to provide more specific context about exactly what you need to do . This could be done with "pseudocode" just to show the flow of what you expect to be able to do.
Sep 05, 2007 08:32 PM|ddjs|LINK
Yeah my bad. The original need was to be able to use embedded resources inside a IHttpModule or IHttpHandler.
I wasn't aware that you could just instantiate Pages and access the ScriptManager.
Didn't mean to be unclear.