Set icon image for button in asp.net using css.to set the position of the icon and size of the icon.
Asked
Active
Viewed 699 times
-1
-
It's preferable to use ImageButton, if you can – Emanuele Apr 15 '16 at 10:11
2 Answers
0
You can do this like these way.
you have to add Jquery UI 1.8.5 for these.
Check fiddle here http://jsfiddle.net/nd8AJ/376/
HTML:
<div class="demo">
<button id="dynabutton">Button with gear icon</button>
<button id="swap">Swap icons</button>
</div>
Jquery:
$(function() {
$( "#dynabutton" ).button({
icons: { primary: "ui-icon-gear" },
text: false
});
$( "#swap" ).button({
icons: { primary: "ui-icon-locked" },
text: true
}).click(function() {
$( "#dynabutton" ).button("option", {
icons: { primary: "ui-icon-locked" }
});
});
});

Bharat
- 5,869
- 4
- 38
- 58