tags:

views:

1107

answers:

4

In order to transfer text from one textbox to another, I have created a submit button. However it would be preferable to use the functionality of the 'enter' key.

I am not sure but i think the ascii code is 13.Anyway how do I go about this task at hand?

+7  A: 

Look at the Form.AcceptButton property.

leppie
A: 

You can subscribe to the KeyUp event of the text box.

private void txtInput_KeyUp(object sender, KeyEventArgs e)
{
    if(e.KeyCode == Keys.Enter)
        DoSomething();
}
Brownman98
A: 

@Brownman98 thanks mate. that worked.

A: 

thanks.. that helped..

Hari Gudigundla