Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set text on a Imagebutton

Status
Not open for further replies.

aspvbnetnerd

Programmer
May 16, 2006
278
SE
I have an Imagebutton and what to set set text right on the image?

Code:
<asp:ImageButton ID="ImageButton1" runat="server" Height="22px" ImageUrl="~/ads.gif"
Style="z-index: 104; left: 35px; position: absolute; top: 343px" Width="186px" />

How could I do that?
 
Hi

You can not. But you can add a background image to a regular [tt]submit[/tt] [tt]input[/tt] :
Code:
<input type="submit" value="Whatever" id="ImageButton1" style="position: absolute; z-index: 104; left: 35px; top: 343px; width: 186px; height: 22px; background-image: url(~/ads.gif); padding: 0; margin: 0; border: none">

Feherke.
 
feharke, thanks for the response.

With your code it became a button and you dont even see the background.

George
 
j4606, all text should be dynamic. All text will retrieved from the database and added to a collection. Then be used from the collection.
 

Isn't this an ASP.NET problem rather than an XHTML/CSS issue?

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top