well you could manually trap the enter key using javascript and call same
clientside code as the onLostFocus
but its not a clean way to do it.. and i just disable enter key.. ie do
nothing if enter key is pressed.
--
Regards,
Hermit Dave
(
http://hdave.blogspot.com)
"PD" <pd*****@commonwealth.com> wrote in message
news:9d**************************@posting.google.c om...
Found a solution... Added onkeypress="return(submitForm());" to the
asp:text control. SubmitForm code..
function submitForm()
{
if (event.keyCode == 13)
{
frmArticle.submit();
}
}
</script>
Then when return key is pressed, the form submits. Appears to work
fine so far.
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:<OY**************@TK2MSFTNGP15.phx.gbl>...
asp.net form doesnot automatically submit on key press enter key.
change event is fired on onLostFocus and causes the focus to move from
current control to the next control then it fires the changed event
then.
hth
--
Regards,
Hermit Dave
(http://hdave.blogspot.com)
"PD" <pd*****@commonwealth.com> wrote in message
news:9d**************************@posting.google.c om... The TextChanged event is not being called when I hit the "Enter" key.
Yet it does for the "Tab" key. I set a break point in the Page_Load
event and the TextChanged event and none of these get called when I
hit the 'Enter' key. After typing in letters in the textbox, if I hit
the 'Tab' key or click outside the text box with my mouse, the event
fires.
Here's the code:
<form id="frmArticle" name="frmArticle" method="post" runat="server">
......
......
<asp:textbox id="txtSearchCriteria"
OnTextChanged="txtSearchCriteria_TextChanged" runat="server"
AutoPostBack=True></asp:textbox></input>
......
......
</form>
Here's the procedure code:
Sub txtSearchCriteria_TextChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs)
Try
FindArticles()
blnSearch = True
Catch ex As Exception
Throw ex
End Try
End Sub
Any suggestions would be greatly appreciated!
Pat