focus to button control on enter

C

camelean

I have a webform that has multiple text boxes and 3 buttons ( Clear,
Close, Search). After test is entered in one of the textboxes I want
the Search button selected if the user presses enter. Currently the
clear button is engaged upon enter.

I have entered the following code in the textchanged event.

Protected Sub txtERname_TextChanged(ByVal sender As Object, ByVal
e As System.EventArgs) Handles txtERname.TextChanged

btnSearch.Focus()

End Sub

using VS 2005

thank you,

jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top