PDA

View Full Version : Using image inside <asp: Button....



ulrich
04-17-2005, 04:57 PM
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 :)

anetteha
03-06-2006, 05:31 PM
Try useing the <asp:imagebutton>