>However, I don't understand how should I add code to the page that uses this control when the button is clicked.
The same way you'd hook any event handler:
// can add to Page_Loadthis.nameOfUserControl.Search_Clicked += this.NameOfMethodToHandleEvent;
// Some other method in the page.private void NameOfMethodToHandleEvent(object sender, EventArgs e)
{
// Code here
}