Execute a line of code like this when you want a message box to be
displayed.
(This writes out the necessary client side javascript to your HTML page to
make the alert pop up as soon as the page is sent to their browser.)
RegisterStartupScript("startupScript", "<script
language=JavaScript>alert('This is my message.');</script>");
Thanks. I am needing the script to only run when it is a PostBack. I
placed the code (had to attach a "Page." to it though) on the "else" of
the IsNotPostBack. It didn't do anything although it compiled fine. I
assume I just don't have a good grasp on it. Basically I am wanting to
call the script only on a Postback. Ideas?
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.