RegisterClientScriptBlock requires <FORM> tag or script will not appear

P

pealy2

A quick pointer to anyone struggling with the RegisterClientScriptBlock
function, unless you already have a <FORM> section in your page then
the script will not be added.

I use vb code to generate all my visual objects on a page and it took
me ages to work out why it wouldn't work on that page. The simple
solution is to manually add a <FORM> </FORM> section to your page (I
found a page which did have the section to see where to put it)

Hope this helps someone, RegisterClientScriptBlock is seriously useful,
I'm using it for sharing variables between my server code and my page
scripts.
 

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