Just to ask a straight question, when I complete adding some data in my page and click submit button, how can I make a popup window saying that the information has been successfully added in database instead of make a new page? Is there any ways that I can do? Any website to be referred? Thanks
You may create a re-usable function for it .
public void Show(string msg)
{
Page page = HttpContext.Current.Handler as Page;
if (page != null)
{
ScriptManager.RegisterStartupScript(page, page.GetType(), "msg", "alert('" + msg + "');", true);
}
}
and in submit button call like this.
protected void btnSubmit_Click(object sender, EventArgs e)
{
// Your Code for submit
Show("Save Success");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With