output javascript to appear at end of page?

T

Tariq Ahmad

hi,

i want to write some javascript at the *end* of my
rendered html page via my webform.

currently i am using response.write and it always
puts it at the top of my page.

using RegisterClientScriptBlock seems to put it
just after the VIEWSTATE bit at the top.

any help appreciated.

thanks.

t.
 
K

Ken Cox [Microsoft MVP]

Here's an article that I wrote that explains the placement and use of
codebehind for emitting client-side script:

http://www.fawcette.com/vsm/2002_07/magazine/columns/aspnet/default_pf.asp

http://www.fawcette.com/vsm/2002_07/magazine/columns/aspnet/table1.asp

Ken

hi,

i want to write some javascript at the *end* of my
rendered html page via my webform.

currently i am using response.write and it always
puts it at the top of my page.

using RegisterClientScriptBlock seems to put it
just after the VIEWSTATE bit at the top.

any help appreciated.

thanks.

t.
 
K

Kevin Spencer

BTW, you should not be using Response.Write for anything. It is deoprecated,
procedural in nature, and exists merely for backwards-compatibility for the
most part, unless you're writing a custom HttpHandler.

--
HTH,

Kevin Spencer
..Net Developer
Microsoft MVP
http://www.takempis.com
Big things are made up
of lots of little things
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top