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

后端 未结 7 671
野趣味
野趣味 2020-12-20 11:17

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

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



        
7条回答
  •  太阳男子
    2020-12-20 11:21

    I actually prefer to use the html button form element and make it runat=server. The button element can hold other elements inside it. You can even add formatting inside it with span's or strong's. Here is an example:

    
    

提交回复
热议问题