On 1 Січ, 21:49, "Andy B" <a_bo...@sbcglobal.net> wrote:
> I have this code in one of my methods:
> ClientScript.RegisterStartupScript(GetType(), "AddNews",
>
> "alert('Sorry! For some reason, the news article couldn't be added. Try
> again later...');", true);
>
Hi Andy
It does not execute while page is loading because of mistake in your
script. You can use single quotes to define a string in javascript
only if that string does not contain single quote itself.
Try this:
ClientScript.RegisterStartupScript(GetType(), "AddNews",
"alert(\"Sorry! For some reason, the news article couldn't be added.
Try again later...\");", true);
Regards,
Mykola
http://marss.co.ua