Hi,
Darrel wrote:
RegisterClientScriptBlock & RegisterStartupScript
See :-http://www.codeproject.com/aspnet/Mayank_Gupta.asp
Hope that helps
Patrick
Well, that's a pain. Isn't javascript supposed to be client side? Why stick
it in the codebehind?
Thanks, though!
-Darrel
I don't get your question.
JavaScript is client-side, but some part of your scripts might depend on
server-side variables. What I do is create JS files with the "pure
client-side code". However, some parts of the code must be created
dynamically on the server (typical example: localized texts), so I add
script lines using RegisterClientScriptBlock.
Eventually, every piece of script added to the page is interpreted and
can be referenced from other piece of script on the same page.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
Private/Malaysia:
http://mypage.bluewin.ch/lbugnion
Support children in Calcutta:
http://www.calcutta-espoir.ch