Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I add an image to an ASP.NET button?

I want to add an image, instead of the default button.

I already have a CSS class for the image, will this work?

<asp:Button ID="..." CssClass=""/> 

I am trying it now, and the image is all scrunched up. Maybe it's a CSS issue?

like image 576
Blankman Avatar asked Mar 24 '10 18:03

Blankman


People also ask

How do I make an image a button in HTML?

The image buttons in the HTML document can be created by using the type attribute of an <input> element. Image buttons also perform the same function as submit buttons, but the only difference between them is that you can keep the image of your choice as a button.


1 Answers

Why not use an ImageButton control?

like image 127
Tim S. Van Haren Avatar answered Sep 17 '22 16:09

Tim S. Van Haren