Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to put image and text both in button.
For that what i have to use..
whether image button or link button or anything else.
image will not be display in background.
Image display near text.
Posted
Comments
Thanks7872 1-May-13 2:42am    
simple.create your desired image with photoshop and use imagebutton in your program.
Varun Sareen 1-May-13 2:44am    
Rohan Leuva 5+

Hello,

Please find following code to add image and text on the button.
HTML
<input type="button" style="background: #EAEAEA url('save.png') no-repeat 5px center; padding:2px 2px 2px 25px;" value="Save" />


It will display image at left and beside the image display text

Thanks and Regards,
Imdadhusen
 
Share this answer
 
Hello

You can used simple css with asp button


like

XML
<style>
  .button {
    border: none;
    background: url('Images/Koala.jpg') no-repeat top left;
    padding: 2px 8px;
}
  </style>

and your code


<asp:Button runat="server" ID="btnExp" Text="Upload"  CssClass="button"/>


Please do it if problem persist please give me your comment.
 
Share this answer
 
Hi,

This is very simple with the help of button element like this:-

XML
<button>
<img src="../../AprilFoolsDay.gif" /> Click
</button>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900