Fatih Mar
Fatih Mar

Reputation: 2500

Sometimes Asp.Net Button Fires Event, Sometimes Not?

I'm trying to make a form-check but submit button (asp:Button) sometimes fires target method and sometimes not. I recorded my debugging operation and uploaded it to YouTube, please watch it first to understand what's going on: YouTube Link >>

I'm really confused about it. Is it just about concurrency or what? What to do? Suggestions? Thanks!

Button Code:

<asp:Button ID="RegisterButton" OnClick="Register" Text="Register" CssClass="button" runat="server" />

Upvotes: 1

Views: 422

Answers (1)

garryp
garryp

Reputation: 5776

You didn't click the button on the one that didn't fire, you pressed return on the keyboard. Check your button is inside a form with runat="server".

Upvotes: 2

Related Questions