I am sure that you are happy to implement the client
postback functionality with your GridView control. Let us add one more feature
to the application which will allow users to filter the results based on their
selection of the city. For this purpose, I have added a DropDownList control
which gives users the option to select either “Houston” or “Austin.” Based on
the user's selection, I will filter the result and display it in the GridView
control. The following is the code used for the DropDownList.
Listing 4 – DropDownList HTML Code
<asp:DropDownList ID="ddlCity"runat="server" AutoPostBack="True" >
<asp:ListItem>Houston</asp:ListItem>
<asp:ListItem>Austin</asp:ListItem>
</asp:DropDownList>