Either you can do this
this.Form.DefaultButton = this.btnId.UniqueID;
or
Using Javascript:
function clickButton(e, buttonid)
{
var evt = e ? e : window.event;
var bt = document.getElementById(buttonid);
if (bt)
{
if (evt.keyCode == 13)
{
bt.click();
return false;
}
}
}
In CoeBehind
ContentPage.Attributes.Add("onkeypress", "javascript:return
clickButton(event,'" + btnSearch.ClientID + "');");