Continuing on from the previous post, lets do something very simple. A find query.
You can use the previous solution for this sample as well.
Create a new ASPX file and drag a map control into it. Also drag in a script manager if there is not one present on the page.
Now we are going to add some labels and text boxes and a button
<asp:Label ID="Label1" runat="server" Text="Find:"></asp:Label>
<asp:TextBox ID="txtFind" runat="server"></asp:TextBox>
<asp:Label ID="lblWhere" runat="server" Text="Where"></asp:Label>
<asp:TextBox ID="txtWhere" runat="server"></asp:TextBox>
<asp:Button ID="btnFind" runat="server" Text="Find This" onclick="FindStuff" />
Now in the code behind we have
protected void FindStuff(object sender, EventArgs e)
string what = txtFind.Text;
string where = txtWhere.Text;
Now build the code and run it in the browser.
I used searched for Sushi in Manhattan, New York and it brought a couple of hits
You can find the updated solution file here