<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="726px" style="text-align: center; color: #000000;" OnItemCommand="DataList1_ItemCommand"> <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="150px" Width="100px" 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 Textbox and Button
<asp:TextBox ID="txtSearch" runat="server"></asp:TextBox> <asp:Button ID="btnSearch" runat="server" Text="Search" />
This is what I want to do. DATALIST: LIST OF PRODUCTS Textbox search: Samsung Galaxy S4 When button click datalis shows: Datalist: Product ID: 2424(<-- example) Product Name: Samsung Galaxy S4 Description: Blah blah blah.... Price: $300(<- example) Stock: 5(<-- example) Thanks in advance
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)