Jude
Jude

Reputation: 2433

Linkbutton does not trigger jquery submit event

What below won't work with any linkbutton, but works fine with all button controls.

 $('form').live("submit", function () {
    ShowProgress();
});

Upvotes: 0

Views: 314

Answers (2)

Andrei
Andrei

Reputation: 56726

Because LinkButtons do postback in a different way. While Button controls are real buttons that actually submit the form, LinkButton are actually links. They do not submit a form, but rather run a certain script on click that calls _doPostBack function.

Upvotes: 2

Win
Win

Reputation: 62301

Since you tag ASP.Net, I assume submit is a LinkButton. If so, you need to use

'#<%= SubmitLinkButton.ClientID %>'

Upvotes: 4

Related Questions