"Alex Maghen" <Al********@newsgroup.nospam> wrote in message
news:F9**********************************@microsof t.com...
When I do this in my page...
ClientScript.RegisterStartupScript(this.GetType(), "SomeScript",
"alert(\"Hi there\");");
it doesn't work AND when I view source, the alert() line is dumped into
the
HTML but with no <SCRIPT> block around it. Why would this be happening?
It doesn't add the script blocks, it simply adds what ever you've specified
to the page just before the closing form tag for the page. You must include
the script tags around your client side script yourself.
ClientScript.RegisterStartupScript(this.GetType(), "SomeScript",
"<script>alert(\"Hi there\");</" + "script>");