Results 1 to 2 of 2

Thread: Using image inside <asp: Button....

  1. #1
    Join Date
    Mar 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Using image inside <asp: Button....

    Hei,

    I would like to use an <img src="addToCart.gif"> instead of text="Add to cart".
    I have the following code:

    <asp:Button runat="server" Text="Add to Cart" BackColor=lightblue CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ProductID") %>' ID="Button1" NAME="Button1">

    </asp:Button>

    The problem is <img src="addToCart.gif"> does'nt works inside the <asp:button> brakket.

    How to solve it? is there an alternative?

    Thank you very much

  2. #2
    Join Date
    Mar 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try useing the <asp:imagebutton>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •