LinkButton background image...

  • Thread starter Thread starter tbaytler
  • Start date Start date
T

tbaytler

Hello all!
Does anyone know if ASP.NET (1.1) linkButton web control can have
background image. I need to have behaiver of the linkButton ( so i can
open new window like target="_blank" in code behind) but need to have
the image instead of the text.

Any help please!
 
Hi,
That would either be an ImageButton or a LinkButton with it's CssClass
property set to a rule to give it a background image

Jon
 
Jon,
two questions:
I have my Css style set.
But how do I set link button property to open new window in new
browser?

thank you for your help
Tatyana
 
Jon,
two questions:
I have my Css style set.
But how do I set link button property to open new window in new
browser?

thank you for your help
Tatyana
 
Hi,
Set the OnClientClick property to whatever script you want. eg
<asp:LinkButton OnClientClick="window.open('page.htm')"

or you could add an attribute in your code behind
YourLinkButton.Attributes.Add("onclick", "window.open('page.htm')")

Jon
 
Back
Top