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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top