The most elegant way to do this is via events. Events keep the black box model of development going, in that the page/form does not have to have any special design to use your control correctly. It either listens to the event, or it doesn't. Additionally events allow you to bind to your form at design time. If you go down the route that you were initially thinking, or that some of the other posters said, if forces the page to have a TB textbox on the page. If I want to use the control, but my textbox is named "Superman", or I want to pop up a messagebox instead, then your control is useless.
The events code is slightly longer, but infinitely more powerful.
Here is an example of some an event I raise in one of my ASP.net forms. Very simmilar code will work with no problems in winforms.
Put this first snippet anywhere inside your namespace (but not inside any other class)
//Create a new event handler delegate, so that you can pass information back to the form. You could use the standard EventHandler, but then you can't pass any info back.
public delegate void SearchUpdateEventHandler(object sender, SearchUpdateEventArgs e);
//Here is a class that you use to hold the info that gets passed back. It has to decend from EventArgs.
public class SearchUpdateEventArgs : EventArgs
public SearchQuery searchQuery;
public SearchUpdateEventArgs(SearchQuery searchQuery)
this.searchQuery = searchQuery;
Then, in your control, have the following code
//Create the event so your form can listen for it
public event SearchUpdateEventHandler UpdateSearchCriteria;
//In your button/link, raise the event back to the form.
private void lnk_Click(object sender, EventArgs e)
searchQuery.SearchText += " " + ((LinkButton) sender).Text;
Results = searchQuery.Search();
//This line makes it so you only raise the event if someone is listening.
//Raise the event, and pass in the data (searchQuery in this case) that you want to send to the form.
UpdateSearchCriteria(this, new SearchUpdateEventArgs(searchQuery));
Finally, in your main form, you have code that listens for the event. This is just like any other event you have on your form for buttons etc.
These last two snippets can be generated automatically using the events (lightning bolt) button on the properties window at design time.
Put this line of code somewhere in your onLoad (or the winforms equivilent)
and then your actual event (just like normal buttons)
private void SearchResultDisplay3_UpdateSearchCriteria(object sender, SearchUpdateEventArgs e)
//Or set your textbox or whatever