3
Answers

Hot to make alert box appear on the same page not on bank

Joma Rajab

Joma Rajab

8y
252
1
I want to display the alter message on the current  page when I click on the button not on the blank page 
 
please help
T
  1. string alertMessage = "<script language=\"javascript\" type=\"text/javascript\">";  
  2.   
  3.             alertMessage += "alert('No quiz avalible');";  
  4.             alertMessage += "window.location.href=\"";  
  5.             alertMessage += "View.aspx?Id=" + Request.QueryString["Id"].ToString();  
  6.             alertMessage += "\";";  
  7.             alertMessage += "</script>";  
  8.   
  9.             ClientScript.RegisterClientScriptBlock(GetType(), "alertMessage ", alertMessage);  
hank you  
Answers (3)