> ClientScript.RegisterClientScriptBlock(Me.Page.GetType(), "ErrorMessage",
> "<script language='javascript'> alert('Error:" & ErrorMessageStr &
> "');</script>")
ClientScript.RegisterStartupScript(GetType(), "ErrorMessage",
"alert('Error:" & ErrorMessageStr & "');", True)
Using the boolean overload makes ASP.NET insert the <script> tags
automatically, so you avoid using deprecated syntax like
"language='javascript'"...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Goran Djuranovic - 05 Nov 2007 20:26 GMT
Mark,
OK, this automatically generates the script tags, but doesn't seem to help
the main problem. Any other suggestions?
Thanks
Goran
>> ClientScript.RegisterClientScriptBlock(Me.Page.GetType(), "ErrorMessage",
>> "<script language='javascript'> alert('Error:" & ErrorMessageStr &
[quoted text clipped - 6 lines]
> automatically, so you avoid using deprecated syntax like
> "language='javascript'"...
Mark Rae [MVP] - 05 Nov 2007 21:08 GMT
> OK, this automatically generates the script tags, but doesn't seem to help
> the main problem. Any other suggestions?
Apologies - I didn't read your post closely enough...
This should solve your problem:
http://www.velocityreviews.com/forums/t368755-making-sure-page-loads.html

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Goran Djuranovic - 05 Nov 2007 21:21 GMT
Mark,
Exactly what I needed.
Thanks a bunch.
Goran
>> OK, this automatically generates the script tags, but doesn't seem to
>> help the main problem. Any other suggestions?
[quoted text clipped - 3 lines]
> This should solve your problem:
> http://www.velocityreviews.com/forums/t368755-making-sure-page-loads.html