jQuery and Clicking an ASP.NET Linkbutton


/ Published in: jQuery
Save to your folder(s)

This is a pretty standard jQuery method to listen for the enter key and simply "click" the button. However, if you are using a LinkButton this code will not work. The reason for this is that a LinkButton is rendered to the browser as an Anchor tag with a href property that contains a javascript action to trigger the postback. Click does nothing on the button as there is nothing for it to complete.

URL: http://www.mitchelsellers.com/blogs/2012/06/21/jquery-and-clicking-an-aspnet-linkbutton.aspx

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.