DataList ImageButton Problems

Discussion in 'ASP .Net Web Controls' started by Travis, Jul 9, 2003.

  1. Travis

    Travis Guest

    Very Simply my aspx code:


    <asp:DataList GridLines=Both CellPadding=10
    RepeatDirection="Horizontal" RepeatColumns="2" Runat="server"
    ID="InsightCat" RepeatLayout="Table" HorizontalAlign=Left
    OnItemDataBound=ImageBound>
    <ItemStyle VerticalAlign="Top"></ItemStyle>

    <ItemTemplate>
    <td align=left>
    <asp:Label Visible=False Runat=server ID=SkU text='<%#
    DataBinder.Eval(Container.DataItem, "SKU_NO") %>'></asp:Label>
    <asp:Image ImageUrl='<%# "Images/" +
    DataBinder.Eval(Container.DataItem, "Product_Image")%>' width="83"
    height="120" ID="ItemImage" Runat="Server" >
    </asp:Image>
    </td>
    <td align=center>
    <asp:Label Runat="server" ID="ItemTitle" CssClass="bodytext" Width=225
    Font-Bold="True" text='<%# DataBinder.Eval(Container.DataItem,
    "Product_Title")%>'></asp:Label><br><br><br>
    <asp:Label ID="Price" Runat="server" Font-Bold="True"
    CssClass=bodytext text='<%# DataBinder.Eval(Container.DataItem,
    "Product_Price", "{0:c}")%>'></asp:Label><br>
    <span class="bodytext">Qty:</span>
    <asp:TextBox Width="40" ID="qty" Runat="server">0</asp:TextBox>
    <asp:ImageButton on ImageUrl="Images/Add_To_Cart.gif" ID=AddToCart1
    Runat="server" OnCommand=AddToCart CommandArgument='<%#
    Container.DataItem("SKU_NO")%>' CommandName=Addcar></asp:ImageButton>
    </ItemTemplate>
    </asp:DataList>

    On the Click of the ImageButton, it will return the SKU_NO, but what I
    really need it to do is to return both the SKU_NO and the quantity
    (asp:textbox id=qty)...
    And I'm having no luck at all doing that. Since there will be 10-12
    items per page, I'm not sure how to do this.
    Any ideas?


    Thanks,

    Travis
    Travis, Jul 9, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nevyn Twyll
    Replies:
    8
    Views:
    1,849
  2. =?Utf-8?B?aG4=?=

    ImageButton in datalist doesn't capture event

    =?Utf-8?B?aG4=?=, Nov 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,939
    =?Utf-8?B?aG4=?=
    Nov 29, 2004
  3. =?Utf-8?B?SnVuaW9yUHJvZ3JhbW1lcg==?=

    Adding ImageButton into Datalist

    =?Utf-8?B?SnVuaW9yUHJvZ3JhbW1lcg==?=, Mar 20, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    7,808
    =?Utf-8?B?SnVuaW9yUHJvZ3JhbW1lcg==?=
    Mar 21, 2006
  4. John Stemper

    ImageButton server control in a Datalist Prob.

    John Stemper, Jul 2, 2003, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    170
    Yan-Hong Huang[MSFT]
    Jul 4, 2003
  5. J 2 the B

    Responding to Imagebutton click in DataList

    J 2 the B, Jul 24, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    261
    Ravikanth[MVP]
    Jul 25, 2003
Loading...

Share This Page