Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
How will we use an image as a button asp.net
please help me i am in a big confusion help me
Posted

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.
 
Share this answer
 
v2
Comments
magiccoder 2-Jan-13 4:52am    
Hey,
otherwise add firebug.This will work great with firefox.
magiccoder 2-Jan-13 4:53am    
Hey Christian Graus,

+5 for you...
Hi,

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.


CSS
.button{
	border:none;
	cursor: pointer;
	background-image: url(../images/btnbg.gif);
	background-repeat: repeat-x;
	background-position: left top;
	width: 81px;
	padding:5px;
	color: #FFF;
}




Happy Coding....
 
Share this answer
 
Hi,

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

.button
{
border:none;
cursor: pointer;
background-image: url('/img/img.png');
background-repeat: no-repeat;
}
 
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