<body onkeydown="checkKey()">

<script language="Javascript">
function checkKey() {
        if(window.event.srcElement.id != "mySubmitButton" &&
window.event.keyCode==13) {
                window.event.returnValue=false;
                }
        }
</script>

-----Original Message-----
From: [email protected] On Behalf Of Giovani Cardoso

I have a page that contains an user control (.ascx). This user control
has a button. When I press the Enter key in my page, this user control's
button is executed. I wouldn't like this happens. How can I avoid this,
because I press the Enter key in one page and the button in another is
executed?
 
Thanks.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to