Click here to Skip to main content
12,694,121 members (34,206 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
How will we use an image as a button
please help me i am in a big confusion help me
Posted 1-Jan-13 23:24pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This is trivial. There's an imagebutton control in ASP.NET. All it does is put an anchor tag around an img tag.

In general, as well as reading books on HTML and ASP.NET ( two different things ), you can work out how to do stuff on web pages by finding a page that does what you want and viewing the source code. Chrome makes this easy.
magiccoder 2-Jan-13 4:52am
otherwise add firebug.This will work great with firefox.
magiccoder 2-Jan-13 4:53am
Hey Christian Graus,

+5 for you...
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


Christian Graus is correct.

Try to add ImageButton control instead of normal button.

Anyways,If you want to use normal button ,then write some css

this is just an example.change the values as you wish.

	cursor: pointer;
	background-image: url(../images/btnbg.gif);
	background-repeat: repeat-x;
	background-position: left top;
	width: 81px;
	color: #FFF;

Happy Coding....
Rate this: bad
Please Sign up or sign in to vote.

Solution 3


a) Use Image button
b) Set Css of a buton.

cursor: pointer;
background-image: url('/img/img.png');
background-repeat: no-repeat;

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 2 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100