My situation is like this i have a asp button inside my user control
<asp:Button ID="btnSubmit"
Text="Send Notification" class="submit-btn01" onclick="btnSubmit_Click1" runat="server" />
in my browser when I refresh my page, button click event automatically happens.i cant figure out what is wrong with this..
Your question is a little vague. It sounds like you have one of the following scenarios:
Scenario A:
Scenario B:
For Scenario A;
if you want to avoid the re-postback, you should do a Response.Redirect() to the current page in the btnSubmit_Click1 event handler, as mentioned in more detail here:
asp.net prevent form submission twice
For Scenario B;
…if it’s scenario B, and the answer to these are no, then I’m very curious to see what the final cause of the problem is as I can’t imagine why a page would behave differently between a load and a reload.