• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 830
  • Last Modified:

ASP Image NavigateURL

I have an image that I dynamically set, so the ImageURL changes.  I can't figure out a way to set the NavigateURL

<asp:Image ID="imgNAME" runat="server" Visible="False"/>
0
MeghanOBrien
Asked:
MeghanOBrien
1 Solution
 
masterpassCommented:
What you can do is wrap it up in a hyperlink

The Image will only have ImageURL and not the NavigateURL
<asp:HyperLink ID="someid" runat="server" NavigateUrl="set the URL you need">
<asp:Image ID="imgNAME" runat="server" Visible="False"  />
</asp:HyperLink>

Open in new window

0
 
jeebukarthikeyanCommented:


- buddha
<asp:HyperLink ID="HyperLink1" ImageUrl="" NavigateUrl="" runat="server">HyperLink</asp:HyperLink>

change the image url dynamically like this  HyperLink1.ImageUrl = "";

Open in new window

0
 
samsymonCommented:
i agree with above.
otherwise you can use image button instead of image control.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now