how to call java script function after executived the server side code

C

Cheng Wei-Chao

hi:
i have a button, when i click it
i want to store data to database and open a new
window

in general we use java script to open new window
but how to call java script function after i
executived the server side code

thank you!
 
V

Vapor

One easy solution is to insert it into the response stream at the
appropriate line in the code behind
[snip]
Response.Write("<script>alert('hello,world')</script>");
 
G

Guest

Try the following and build on it

string script = "<script language='javascript'>\n
script += "alert('hey there');\n"
script += "</script>"

RegisterStartupScript("StartUp",script)
 

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