txtWhateverto your text control name.
>If txtWhatever.Attributes.Item("onKeyDown") Is Nothing Then > txtWhatever.Attributes.Add("onKeyDown", _ > "if(event.keyCode == 13){ try { event.cancel = true; document.Form1.submit();} catch(e) { }}") >Else > txtWhatever.Attributes.Add("onKeyDown", _ > txtWhatever.Attributes.Item("onKeyDown").ToString & _ > "if(event.keyCode == 13){ try { event.cancel = true; document.Form1.submit();} catch(e) { }}") >End If >>