Adding an image and text both in asp.net button

后端 未结 4 711
没有蜡笔的小新
没有蜡笔的小新 2021-01-05 04:46

I am looking for a solution where I will be able to add an image and text both in asp.net button.

 

        
4条回答
  •  耶瑟儿~
    2021-01-05 05:19

    By default, ASP .Net doesn't have a button which can render both image and text at the same time. However, you can achieve in two ways.

    Using CSS

    I prefer CSS because it is light weight, and you can style it whatever you want.

    enter image description here

    
    
    
    

    Third Party Control

    It works right out of the box. However, you cannot change their style easily.

    enter image description here

    Use third party control like Telerik RadButton.

    Last but not least if you want, you can implement a custom server control by yourself.

提交回复
热议问题