Consider a master page with a search functionality and other number of content pages derived from that master page, so that searchbox appears in all pages. If you want to display a search results in Search.aspx page no matter where you are( in other content pages),add this code:
In MasterPage.cs:
Protected void search_button_Click(object sender, EventArgs e)
{
//redirect textbox's value to search.aspx page
Response.Redirect(@"~/search.aspx?q=" + Server.UrlEncode(txtSearch.Text));
}
In Search.aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
//read the master page's redirected value
string str = Request.QueryString[@"q"];
}
--Happy Coding