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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View PDF using asp:ImageButton 1

Status
Not open for further replies.

Strobeman

Programmer
May 16, 2003
40
AU
Hi All
I have managed to link to a PDF document from a hyperlink as follows:

<asp:HyperLink ID="hlkViewPDF" runat="server" Text="View the Proposal" Target="_blank" NavigateUrl="~/documents/Annual Proposal.pdf" ></asp:HyperLink>

Can anyone tell me how to do the same from an asp:ImageButton on a web app?
 
Is there a specific reason why you want to do it with an image button instead of the hyperlink using an image?

<asp:HyperLink ID="HyperLink1" runat="server" ImageUrl="images/image.jpg"
NavigateUrl="~/addtest.aspx" Target="_blank">HyperLink</asp:HyperLink>

Bob B.
 
Thanks bobmmp, I had forgotten about that. That will work perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top