Erinc Kuzu

Erinc Kuzu

  • NA
  • 1
  • 0

ProductId From Datalist in ImageButton

Oct 13 2006 2:03 PM
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" Height="399px" RepeatColumns="2" RepeatDirection="Horizontal">
    <ItemTemplate>

        <asp:ImageButton  height="43" src="arts/Btn_AddBox.gif" vspace="3" width="21" ImageUrl="~/arts/Btn_Buy.gif" ID="ImageButton" runat="server" />

</ItemTemplate>
</asp:DataList>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DB_ConnectionString %>" SelectCommand="SELECT ProductId FROM [tblProducts] Where ProductMasterPage=1">
</asp:SqlDataSource>

I make a ShopingBox

How can i have ProductId(coming from SQL Query) in Codebehind when i click on the imagebutton ?