Javascript Alert Message from code behind in ASP.NET

public static void ShowAlertMessage(string error)
{

Page page = HttpContext.Current.Handler as Page;
if (page != null)
{
error = error.Replace("'", "\'");
ScriptManager.RegisterStartupScript(page, page.GetType(), "err_msg", "alert('" + error + "');", true);
}
}

Comments
Advertisements
Zimbio Entertainment
Copyright © 2012 - Zimbio, Inc. Some rights reserved. Coming soon: Livingly
Share
. . .
Follow
. . .