Add an Image to a HyperlinkField Control

keithwilson1
keithwilson1 used Ask the Experts™
on
I tried this control and it through an error.  Need help.

<asp:HyperLinkField DataTextField="RequestID"
Text="<img src='Images/icon_pdf.gif' alt='SPED Invoice' border='0'/>"
                                                 DataNavigateUrlFields="RequestID"
                                                 DataNavigateUrlFormatString="Default2.aspx?RequestID={0}"
                                                 HeaderText="Generate SPED Invoice" SortExpression="RequestID" ControlStyle-Font-Underline="true"

                                                 HeaderStyle-Width="50px">
                                                                                           
                                                 <ControlStyle Font-Underline="True"></ControlStyle>
                                            </asp:HyperLinkField>
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Expert of the Year 2014
Top Expert 2014
Commented:
Why are you adding an image into the title tag - it won't work
keithwilson1developer

Author

Commented:
Yes I know.  I figured out how to do it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial