PDA

View Full Version : How do I change my single search in multiple search?


CalUK1986
04-24-2009, 02:43 AM
I have managed to get my website to search my grid view, but I now want to be able to let my website do multiple searches. So for example a user can write "Cheese, Bread" into the textbox, and have all recipes related to them both returned instead of only being able to write one search in the box such as just "Cheese"

my code is as follows:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:FoodagoMainDatabaseConnectionString %>"
SelectCommand="SELECT [Recipe Name] AS Recipe_Name, [Method], [Ingredient Name] AS Ingredient_Name, [Quantity] FROM [ViewNorm] WHERE ([Ingredient Name] = @Ingredient_Name)">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="Ingredient_Name"
PropertyName="Text" Type="String" />
</SelectParameters>

</asp:SqlDataSource>