Hi,
I have created a web page that contains 4 fields and a filter button.
Based on the values entered in the textboxes a report will be generated.
The report is a grid view.This a report that contains issues.
When I click on any issue in the report it will show you all the details of that issue it has a close button.
When I click on a close button it will close the issue,(means it will delete the issue from the report).
And now the problem is I want to put an alert on a close button so that it will show an alert when the issue is closed.
I have tried the following way.
1)Response.Write("<script>alert('Issue has been closed')</script>");
When I tried this it is showing me the alert message but I cannot see the screen backside.
It is showing me a white blank page when the alert pops out.
I have tried the following javascript funtion,but no use.
public static class Alert
{
/// <summary>
/// Shows a client-side JavaScript alert in the browser.
/// </summary>
/// <param name="message">The message to appear in the alert.</param>
public static void Show(string message)
{
// Cleans the message to allow single quotation marks
string cleanMessage = message.Replace("'", "\\'");
string script = "<script type=\"text/javascript\">alert('" + cleanMessage + "');</script>";
// Gets the executing web page
Page page = HttpContext.Current.CurrentHandler as Page;
// Checks if the handler is a Page and that the script isn't allready on the Page
if (page != null && !page.ClientScript.IsClientScriptBlockRegistered("alert"))
{
page.ClientScript.RegisterClientScriptBlock(typeof(Alert), "alert", script);
}
}
}
Can any one please help me regarding this .
Its very urgent.
Thanks in advance