Last post Jan 29, 2009 02:45 PM by NuJoizey
Jan 27, 2009 05:24 PM|NuJoizey|LINK
My issue is similar to the below two posts, neither of which worked for me.
I have an aspx page with a text box and a search button. If the user enters something in the search box and then clicks the search button with the mouse, everything is fine, but if the user happens to hit the "enter" key to submit the form, everything
still works, except you get that annoying "donk!" windows error sound along with it. This leads the user to believe that some error has occurred when there is none.
How do I make it go away programatically?
Jan 27, 2009 06:31 PM|TheDirtyBird|LINK
This should help:
Jan 27, 2009 07:29 PM|NuJoizey|LINK
hi, i think that code is for vb.net, wheras I am using asp.net with VB, so many of the objects or the sytax don't seem to correspond. I tried to make it work in my asp codebehind but was unsuccessful - any way you (or someone) could clarify?
note: i only seem to get the "donk" sound when using IE browser.
Jan 27, 2009 09:52 PM|NuJoizey|LINK
here is how I got around the problem.
1. assumed (rightly or wrongly) that the sound is caused by the OS, and can't be bypassed.
2. in the aspx code, I wrapped the controls for the search in a <asp: panel> control, and set the "defaultbutton" property to be the searchbutton so that when the users presses enter, that click event is triggered, and the "donk" thankfully seems to be bypassed,
at least on IE7
Jan 27, 2009 10:19 PM|shahed.kazi|LINK
I think it is default windows behaviour. You may not be able to disable it since you may not have required access to the client's machine.
Jan 29, 2009 09:58 AM|KeFang Chen - MSFT|LINK
Based on your description, I think the issue is caused by the browser.
So maybe we need a workaround . You can refer to the following website to get information on "DefaultButton".
Jan 29, 2009 02:45 PM|NuJoizey|LINK
thank you all for your responses and for your helpful references. I was able to resolve my issue