I am developing a website in which I am trying to display messages through ClientScript.RegisterStartUpScript.
This one was displayed successfully:
ClientScript.RegisterStartupScript(this.GetType(), "myalert",
"alert('All questions have been visited !');", true);
Although it gave a message with a checkbox saying "Prevent this page from creating additional dialogs".I did not check the checkbox. In my code behind I have this condition:
if (lblUnConfirmedQuestions.Text=="0")
{
}
else
{
ClientScript.RegisterStartupScript(this.GetType(), "msg",
"alert( 'Please attempt all the questions !')",true);
}
This one was supposed to be displayed later but it did not appear.
On the internet I found a suggestion to remove single quotes from the ClientScript message ,I removed them but still no success could be achieved.What should I do to display the second clientscript message?