Joma Rajab

Joma Rajab

  • NA
  • 110
  • 49.2k

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

Aug 3 2016 9:38 AM
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)