It seems like this would be fairly straight forward. I've got a gridview that loads up using one stored proc, but I've got a searchbox to filter the grid, and when the user enters some criteria I want to use a different proc to return the results. Something tells me I should be doing this with one procedure, but I can't seem to make that work either.
When the form loads, my grid is populated. And if I leave my search criteria blank and search anyway, my grid is still populated correctly. But if I enter search creteria, I get diddley squat. What gives?
Here is the relevent snippets.
<asp:Panel ID="pnlSearch" runat="server" DefaultButton="btnSearch">
Search:<asp:TextBox ID="txtSearch" runat="server" />
<asp:Button ID="btnSearch" runat="server" Text="Go" Click="btnSearch_Click" />
<asp:SqlDataSource ID="sdsCustomers" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ Connectionstrings:ConnectionString.Providername %>"
View Complete Post