Hi !
I'm working with Win 2K and Visual Studio 2003.
I have a problem because pressing <ENTER> in a text input control causes a
postback of my web form.
Here comes some example code (already stripped of most of the unnecessary
code):
----------------------------------------------------------------------------
----------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="GENERATOR " Content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" Content="C#">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body>
<form name="Form1" method="post" action="WebForm 1.aspx" id="Form1">
<input type="hidden" name="__VIEWSTA TE"
value="dDwtMTI3 OTMzNDM4NDs7PmA 5uGMyk9VLm/FRbF5zeYsdMA+5" />
<INPUT onkeydown="aler t('Hi, down !');" onkeyup="alert( 'Hi, up!');">
</form>
</body>
</HTML>
----------------------------------------------------------------------------
----------------------------------------------------------
The postback occurs after the onkeydown event and before the onkeyup event,
but I don't understand why.
Does anybody know a way of avoiding this undesirable automatic postback ?
Your kind help would be appreciated.
Peter