I am new to ASP/C# programming:
I have an asp:button
created as follows:
<asp:button
ID="CreateItem"
ClientIDMode="Static"
OnClick="btnSave_Click"
runat="server"
Text="SAVE">
</asp:button>
In the code behind, I have the following:
btnSave_Click(object sender, EventArgs e)
{
//Code here to create an Item
}
I noticed that when I refresh the page after clicking my button, this function is being called. To verify, I ran the debugger and set a breakpoint inside the btnSave_Click
function and verified that it was indeed going inside the function when I refresh my page. What am I doing wrong?