Click here to Skip to main content
15,904,023 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
if (grdReplicate.Rows[index].Cells[32].Text == "Y ")
 {
  messagetest("Cannot select already deffered records");
  return;
}



public void messagetest(string message)
    {
        ScriptManager.RegisterStartupScript(this.Page, base.GetType(), "Message", "javascript:alert('" + message + "')", true);
    }


But in my page I Have used ModalPopupExtender which is restricting the message box from getting displayed?
Any solutions?Need Urgently?
Posted

1 solution

Add semicolon (i.e. ;) after alert statement, update it like below:

ScriptManager.RegisterStartupScript(this.Page, base.GetType(), "Message", "javascript:alert('" + message + "');", true);


i believe your script is throwing an exception and because "Disable script debugging" is checked in IE you are not getting any notification.

Hope this will help.


Thanks,
Hemant
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900