RegisterClientScriptBlock in global.asax

S

sam

I am trying to emit script to the response stream within the
Application_Error handler in global.asax. I want to emit using
Page.RegisterClientScriptBlock. This doesn't work, and I have been reading
that you can not get access to the Page class from within global.asax. But I
am able to get a hold of the response object through context.current and
submit using response.write, though I want more control. If it is possible
to do a response.write why can we not do a RegisterClientScriptBlock, it is
all part of the response stream?



Is the RegisterClientScriptBlock accessible another way in the global.asax?
 
G

Guest

If you have a common base page class for all ur pages. you can handle
onerror() event in the common base page class and use
registerclientscriptblock()
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top