I have a image button in a page which can be triggered on mouse click, by default it gets triggered on enter press also which i want to disable.
how to make the submit behaviour of the aspx:image
button false
Asked
Active
Viewed 1,191 times
-1

Andro Selva
- 53,910
- 52
- 193
- 240

user1811256
- 1
- 1
-
2duplicate: http://stackoverflow.com/questions/1561400/how-to-disable-submit-behaviour-of-aspimagebutton – Hardrada Nov 09 '12 at 05:09
-
^^^ Wow. It's an exact duplicate.. diffuerent username.. – Simon Whitehead Nov 09 '12 at 05:10
-
@SimonWhitehead Pretty freakin scary, right? makes you wonder.. are you and I the only ones on SO? seems we're following each other around..lol – Hardrada Nov 09 '12 at 05:21
1 Answers
0
try this:
$(function(){
$('#<%=imgBtn.ClientID%>').keydown(function(e){
if(e.which==13)
{
return false;
}
});
});

Andro Selva
- 53,910
- 52
- 193
- 240

locke
- 1