Paul D. Fox wrote:
I'd like to modularize my code and I like using the
"RegisterClientScriptBlock()" routine. However, I need to have a piece of
JavaScript registered at the end of the HTML form. My only work-around is
to hard code it in the HTML. Can I get the RegisterClientScriptBlock() to
write the script out at the end?
Paul
Hi Paul,
I don't think there is a specific way to do that within ASP.Net, i think
your easiest options are to Response.Write your script block at the end
of page execution, or to place it in the HTML like you said. If you
want to keep it modular, you could always create a class that inherits
from Page and create a method such as RegisterEndScriptBlock() in that
class which outputs your script contents.
--
Rob Schieber