Groups | Blog | Home
all groups > asp.net webcontrols > june 2004 >

asp.net webcontrols : ImageButton Rendering?


localhost
6/17/2004 4:29:35 PM

I have an ImageButton that renders this HTML:

<input
type="image" name="Send" id="Send" src="send.gif" border="0"
/>

I would like to to render to this instead:

<a href="#"><img id="Send" src="send.gif" border="0" /></a>

Because I have style sheets that manage img tags but not input tags of
type image.

How can I modify how the ImageButton is rendered but let it still
participate int he PostBack process?



Thanks.

Ken Cox [Microsoft MVP]
6/17/2004 7:09:05 PM
Hi localhost (No real name?),

Will this do it for you?

LinkButton1.Text = "<img id='Send' src='send.gif' border='0' />"

Ken

[quoted text, click to view]
AddThis Social Bookmark Button