I have a button below:
<asp:Button ID="btnApprove" runat="server" Text="Approve" CssClass="button" OnClick="btnApprove_Click" />
The server side event handler for this button:
protected void btnApprove_Click(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(Page.GetType(), "key", "alert('Button Approve Clicked')", true);
}
Just get a warning when you click a button on the server side.
My problem is that after I clicked on the Approve button, now when I load or refresh my page again, this event btnApprove_Clickis fired every time.
I have a “others” button on the same form, but no one shows this strange behavior. I tried to change this button as HTML, but still the same behavior.
Someone can help me get out of it. Thanks in advance.
source
share