Thanks vgiambattista for your reply .
But i found the solution of probelm .
the problem was appearing due the button control actually bydefault ONSUBMITBehaviour property was true so whenever i press enter key
button_click event was executing.
so i just set ONSUBMITBehaviour of button control false . now my code is working properly.