Saturday, December 29, 2018

Confirmation Box In Button Click

Confirmation Box In Button Click

protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["S_userlogId"] != null && Session.Count > 0)
        {
              if (!IsPostBack)
                {
                    init();

                }
        }
        else
        {
            Response.Redirect("~/Default.aspx");
        }
        btn_SaveAsDraft.Attributes.Add("onclick", "javascript:return confirm('Confirm to save the information and proceed to fill up data at other sections?')");
    }

HTML

<asp:Button ID="btn_SaveAsDraft" runat="server"
                            onclick="btn_SaveAsDraft_Click" Text="Save &amp; Next"
                            CssClass="ButtonText" />

No comments:

Post a Comment