How can i use the image in the asp button controlhttp://forums.asp.net/t/1662334.aspx/1?How+can+i+use+the+image+in+the+asp+button+controlTue, 22 Mar 2011 08:47:36 -040016623344338469http://forums.asp.net/p/1662334/4338469.aspx/1?How+can+i+use+the+image+in+the+asp+button+controlHow can i use the image in the asp button control <p>Example i am having a asp button which is used to&nbsp;save the data in the database&nbsp;using the event <span size="2" color="#0000ff" style="font-size:x-small; color:#0000ff">btnApply_Click</span>.</p> <p>&nbsp;</p> <p><span size="2" style="font-size:x-small"><font size="2" style="font-size:x-small"></p> <p>&nbsp;</p> </font></span><span size="2" color="#0000ff" style="font-size:x-small; color:#0000ff">&lt;</span><span size="2" color="#800000" style="font-size:x-small; color:#800000">asp</span><span size="2" color="#0000ff" style="font-size:x-small; color:#0000ff">:</span><span size="2" color="#800000" style="font-size:x-small; color:#800000">Button</span><span size="2" style="font-size:x-small"> </span><span size="2" color="#ff0000" style="font-size:x-small; color:#ff0000">ID</span><span size="2" color="#0000ff" style="font-size:x-small; color:#0000ff">=&quot;btnApply&quot;</span><span size="2" style="font-size:x-small"> </span><span size="2" color="#ff0000" style="font-size:x-small; color:#ff0000">runat</span><span size="2" color="#0000ff" style="font-size:x-small; color:#0000ff">=&quot;server&quot;</span><span size="2" style="font-size:x-small"> </span><span size="2" color="#ff0000" style="font-size:x-small; color:#ff0000">Text</span><span size="2" color="#0000ff" style="font-size:x-small; color:#0000ff">=&quot;Apply&quot;</span><span size="2" style="font-size:x-small"> </span><span size="2" color="#ff0000" style="font-size:x-small; color:#ff0000">OnClick</span><span size="2" color="#0000ff" style="font-size:x-small; color:#0000ff">=&quot;btnApply_Click&quot;</span><span size="2" style="font-size:x-small"> /</span><span size="2" color="#0000ff" style="font-size:x-small; color:#0000ff">&gt; <p><font></font>My Requirement: I want to design the button like vista 3D button.</p> <p><span size="2" color="#0000ff" style="font-size:x-small; color:#0000ff">&nbsp;</span></p> </span> <p></p> <p>&nbsp;</p> 2011-03-11T09:05:00-05:004338609http://forums.asp.net/p/1662334/4338609.aspx/1?Re+How+can+i+use+the+image+in+the+asp+button+controlRe: How can i use the image in the asp button control <p>Simply you can use the <strong>&lt;asp:imagebutton</strong> which will take ImagePath to be shown on button.</p> 2011-03-11T10:50:35-05:004340851http://forums.asp.net/p/1662334/4340851.aspx/1?Re+How+can+i+use+the+image+in+the+asp+button+controlRe: How can i use the image in the asp button control <p>I want to use only the &lt;asp:Button not image button...</p> <p>PLease help me</p> 2011-03-14T04:42:49-04:004352316http://forums.asp.net/p/1662334/4352316.aspx/1?Re+How+can+i+use+the+image+in+the+asp+button+controlRe: How can i use the image in the asp button control <p>remove the value in the &quot;text&quot;, and add cssclass </p> <p><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">&lt;</span><span size="3" color="#800000" style="font-size:x-small; color:#800000">asp</span><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">:</span><span size="3" color="#800000" style="font-size:x-small; color:#800000">Button</span><span size="3" style="font-size:x-small"> </span><span size="3" color="#ff0000" style="font-size:x-small; color:#ff0000">ID</span><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">=&quot;btnApply&quot; </span><span size="3" style="font-size:x-small">&nbsp;</span><strong><span size="3" color="#ff0000" style="font-size:x-small; color:#ff0000">cssclass=</span><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">&quot;Mybutton1&quot;</span></strong><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff"> </span><span size="3" color="#ff0000" style="font-size:x-small; color:#ff0000">runat</span><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">=&quot;server&quot;</span><span size="3" style="font-size:x-small"> </span><strong><span size="3" color="#ff0000" style="font-size:x-small; color:#ff0000">Text</span><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">=&quot;&quot;</span><span size="3" style="font-size:x-small"> </span></strong><span size="3" color="#ff0000" style="font-size:x-small; color:#ff0000">OnClick</span><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">=&quot;btnApply_Click&quot;</span><span size="3" style="font-size:x-small"> /</span><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">&gt; </span></p> <p>&nbsp;</p> <p><span size="4" color="#0000ff" style="font-size:x-small; color:#0000ff">and in the css </span></p> <p><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">.</span><span size="3" color="#ff0000" style="font-size:x-small; color:#ff0000">Mybutton1 </span><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">{ width: 60px; height:80px; background: url('images/myimages.jpg') no-repeat;}</span><span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">&nbsp;</span></p> <p>&nbsp;</p> <p size="3">instead the width and height write the height and the width of the picture</p> <p>and instead the &quot;<span size="3" color="#0000ff" style="font-size:x-small; color:#0000ff">images/myimages.jpg&quot; </span>write the address of the button image</p> 2011-03-22T08:13:53-04:004352358http://forums.asp.net/p/1662334/4352358.aspx/1?Re+How+can+i+use+the+image+in+the+asp+button+controlRe: How can i use the image in the asp button control <p>Try like this.... change image url as you like...<br> <br> &nbsp;&lt;asp:Button ID=&quot;Button1&quot; runat=&quot;server&quot; style=&quot;background-image: url('http://www.makemyhome.info/images/addtocart.png'); width: 105px; height: 30px;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; background-color:Transparent;&quot; /&gt;</p> 2011-03-22T08:47:36-04:00