V
Velislav
Hi,
I have a client script block, which is registered in my Page_Load.
However a button may result in the need to change the script which I've
registered.
Obviously the OnClick event occurs after Page_Load, so calling
RegisterClientScriptBlock with the same key does nothing.
Unfortunately I have other buttons (inside custom web controls) which
cause postbacks but no changes to the script, which means I can't do
something like
if (!IsPostBack) CallMethodWhichCreatesAndRegistersTheScript();
in Page_Load
I have a client script block, which is registered in my Page_Load.
However a button may result in the need to change the script which I've
registered.
Obviously the OnClick event occurs after Page_Load, so calling
RegisterClientScriptBlock with the same key does nothing.
Unfortunately I have other buttons (inside custom web controls) which
cause postbacks but no changes to the script, which means I can't do
something like
if (!IsPostBack) CallMethodWhichCreatesAndRegistersTheScript();
in Page_Load