Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
How will we use an image as a button asp.net
please help me i am in a big confusion help me
Posted 1-Jan-13 22:24pm
Rate this: bad
good
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.
  Permalink  
v2
Comments
magiccoder at 2-Jan-13 4:52am
   
Hey, otherwise add firebug.This will work great with firefox.
magiccoder at 2-Jan-13 4:53am
   
Hey Christian Graus, +5 for you...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
 

 
.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....
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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;
}
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Shai Vashdi 1,588
1 OriginalGriff 528
2 Manas Bhardwaj 383
3 Damith Weerasinghe 330
4 Tadit Dash 315
0 Sergey Alexandrovich Kryukov 9,575
1 OriginalGriff 6,006
2 Peter Leow 4,500
3 Maciej Los 3,540
4 Abhinav S 3,513


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