V
Vipul Pathak
Hi,
I am writing a WebControl. With that I need to emit JavaScript code on the
page. For that I am using "Page.RegisterClientScriptBlock" method inside the
PreRender event. It is shocking to see that the the method takes the script
to emit, but does not actually emit it on the page. Neither it throws any
exception.
I am emiting JavaScript from 2 places: PreRender event and Render event. In
PreRender, I am using Page.RegisterClientScriptBlock() and In Render I am
using output.Write(). It could be noticed that output.Write() is working,
but Page.RegisterClientScriptBlock() is not.
What might be the reason? Any Help ?
Thanks,
** Vipul ;
PS: Also to note, RegisterStartupScript() is working from PreRender.
=======================================
VIPUL PATHAK
Impetus Infotech India Pvt. Limited,
Indore, MP, India.
I am writing a WebControl. With that I need to emit JavaScript code on the
page. For that I am using "Page.RegisterClientScriptBlock" method inside the
PreRender event. It is shocking to see that the the method takes the script
to emit, but does not actually emit it on the page. Neither it throws any
exception.
I am emiting JavaScript from 2 places: PreRender event and Render event. In
PreRender, I am using Page.RegisterClientScriptBlock() and In Render I am
using output.Write(). It could be noticed that output.Write() is working,
but Page.RegisterClientScriptBlock() is not.
What might be the reason? Any Help ?
Thanks,
** Vipul ;
PS: Also to note, RegisterStartupScript() is working from PreRender.
=======================================
VIPUL PATHAK
Impetus Infotech India Pvt. Limited,
Indore, MP, India.