Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Enter Key fire event Need help with Code

Author  Topic 

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2008-04-23 : 12:46:56
Hi Group I have a "txtGen" textbox that needs to fire and event the same as if I press "lnkSearch".

Private Sub lnkSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lnkSearch.Click
LoadGrid(rdoCOAType.SelectedValue, 0)
lnkSave.Visible = True
lnkCancel.Visible = True

'ClientScript.RegisterStartupScript("Enter", "SetFocus", "<script>document.getElementById('" & txtGen.ClientID & _ "').focus();</script>")

End Sub


Right now Nothing seems to work. I set a focus on the Design ASP.Net page as follow:
<BODY leftMargin="0" topMargin="0" onload="javascript:document.Form1.txtGen.focus();">

Any help is welcome THANK YOU IN ADVANCE !!!!!!!!!!!!!!!!
   

- Advertisement -