Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my Datalist.


C#
<asp:DataList ID="DataList1" runat="server" DataKeyField="ProductID" 
        DataSourceID="SqlDataSource1" onitemdatabound="use" BackColor="White" 
        EmptyDataText="Please Select Category."
           BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
           GridLines="Horizontal" RepeatColumns="3" RepeatDirection="Horizontal" 
        Height="534px" Width="720px" style="text-align: center; color: #000000;">
        <AlternatingItemStyle BackColor="White" />
        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
        <ItemStyle BackColor="White" ForeColor="#4A3C8C" />
         <ItemTemplate>
            <asp:ImageButton ID="btnFileImg" runat="server" Height="100px" Width="80px" ImageUrl='<%# Eval("filename") %>'  PostBackUrl='<%# Eval("ProductID", "ProductDetails.aspx?ProductID={0}") %>' />
            <asp:Label ID="ImageUrlLabel" runat="server" Text='<%# Eval("filename") %>' Visible="False"></asp:Label><br />
    <br />
            <a href='ProductDetails.aspx?productID=<%# Eval("ProductID") %>' style="font-size: 15px; color: black">
            <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("productName") %>'/><br />
            </a>
            Price: 
            <asp:Label ID="PriceLabel" runat="server" Text='<%# Eval("price") %>' />

        </ItemTemplate>
        <SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
    </asp:DataList>




This is my Search textbox and button.


C#
<asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" Text="Search" />



How can I search Product Name or Brand using Textbox and search button?
Posted

1 solution

 
Share this answer
 
Comments
Gihan Liyanage 15-Sep-14 6:28am    
Did you got a solution from my support, I can see you have not accepted any answer.If you are ok with this answer plz accept it. Then any user having same problem can identified it has solved the problem..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900