Since the controls will all be strongly named it would be easy to just grab them each by name, but if you need them in an array you could wrap the controls in a panel..
You could do something similar to this:
<div runat="server" id="myPanel">
<asp:TextBox runat="server" id="search1" />
<asp:TextBox runat="server" id="search2" />
<asp:TextBox runat="server" id="search3" />
</div>
Linq:
IEnumerable<string> values = myPanel.Controls.OfType<TextBox>()
.Select(textBox => textBox.Text);
Non Linq:
string[] values = new string[myPanel.Controls.Count];
for(int i = 0; i < myPanel.Controls.Count; ++i)
{
values[i] = (myPanel.Controls[i] as TextBox).Text;
}
Edited:
If you are going to dynamically add (or just have non-asp) inputs then it can actually be significantly easier to turn the inputs into an array server side.
For instance if you wish to have a bunch of <input type='text' name='search[]' />
on the page, on the server you can do the following to turn the items into a string array:
string[] inputValues = Request.Form["search[]"].Split(',');
So for the original example provided the equivalent would be:
HTML:
<input name="Search[]" value="google" />
<input name="Search[]" value="yahoo" />
<input name="Search[]" value="alltheweb" />
C#:
string[] myArray = Request.Form["search[]"].Split(',');
/*
myArray is now an array like:
0: "google"
1: "yahoo"
2: "alltheweb"
/*