In catch blok I wrote like this ...but the messagebox is not showing in UI level....I need to show the error message in UI when service is down
Please help
if(((System.Net.HttpWebResponse)((System.Net.WebException)ex.InnerException).Response).StatusDescription == "Not Found")
{
Response.Write("<script>alert(' Service is down...Please try after sometimes');</script>");
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Inserted Successfully')", true);
}