Windows form or web form?

Also your question is a little difficult to follow.

Is the button code being activated now and you want to stop it from doing so or is the button code not being activated and you would like it to run on enter key press?