You can use following function as follow :
public void DisplayAJAXMessage(string msg)
{
Control page = this;
string myScript = String.Format("alert('{0}');", msg);
ScriptManager.RegisterStartupScript(page, page.GetType(), "MyScript", myScript, true);
}
DisplayAJAXMessage("hello I am alert");
public void DisplayAJAXMessage(string msg)
{
Control page = this;
string myScript = String.Format("alert('{0}');", msg);
ScriptManager.RegisterStartupScript(page, page.GetType(), "MyScript", myScript, true);
}
DisplayAJAXMessage("hello I am alert");
Comments
Post a Comment