Last post Jul 10, 2009 04:57 PM by guilhermecardoso
Jul 09, 2009 09:51 PM|guilhermecardoso|LINK
I'm using a nice alert dialog (check it here) and it works good on FF but i've a few costumers telling me that IE gives problems.
You can see the alert dialog in action here. If you click Entrar, it will prompt you a message. I'm using
Page.ClientScript to prompt it. Something like this:
It's possible that i'm getting this error because i'm trying to using it from codebehind and maybe i'm doing something wrong with that Page propriety, or it maybe from the alert dialog?
If possible, could you recommend me an friendly Alert Dialog compatible with IE6? (i've a costumer with IE6 on his company and he don't want to update it, he prefer to give me even more work...)
Jul 10, 2009 12:08 AM|harieis|LINK
Please use this code for alert a message
StringBuilder strBuilder = new StringBuilder();
strBuilder.Append("window.alert('No Records Available for this search');");
Page.RegisterStartupScript("Warning Message", strBuilder.ToString());
Jul 10, 2009 03:29 AM|guilhermecardoso|LINK
Yes, but i'm trying to use a friendly alert dialog, diffrent from the classic
My question is if that error on IE is from the browser or from the Page.StartupScript..
Jul 10, 2009 04:09 AM|harieis|LINK
ScriptManager.RegisterStartupScript(Page , Page.GetType() , "Hello" , "YourJavascipt_without script tag" , true);
Jul 10, 2009 04:57 PM|guilhermecardoso|LINK
Thanks for the help but i'm getting the same error.
I've downloaded an Internet Explorer 7 version to test it (i'm using 8) and i'm getting the operatio aborted. I searched on Google about it and some people are telling that it may be cause because the script is rendered inside body tag, but i think that
RegisterStartupScript will rend the code before the form tag, but i don't know if it's after the body..