Technically, you can but you will run into problems because the script must
be streamed out to the client thru the response object. The response object
is owned by the main thread and such cross pollination is forbidden. As an
alternative, you can build the script on a thread, pass it back to the main
thread and then the main thread can stream it out to the client.
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.