Help with Embedded User Control RESPONSE.WRITE coding

J

John Cosmas

If I included a UserControl in a form, and them tell it to Response.Write
some code, will the resulting client script work after the page is rendered.
Let's say that I instructed the User Control in the form, to Response.Write
a Window.Open instruction...

John Cosmas
 
H

Hermit Dave

once rendered your control will have to initiate a postback in order to
write. ie on click of something you can cause a postback and then your
control can write appropriate output. if the page is in a rendered state
there is not page class and there is no instance of your user control in
current context of the server.

hope it came across clearly

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 
C

Curt_C [MVP]

yes but it's not the best way to do it. Perhaps you can give more background
though so we can point you in the right direction.
 

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

Top