Click here to Skip to main content
12,301,394 members (63,308 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET CSS image
Dear Friends,

I have a IMAGE.

My requirement is, I need to add a Back Button or hyperlink on to that Image.

When User Clicks on to that Image Hyperlink, It must go back to previous page.

Please help me, How to add Hyperlink(Go Back) on a image...so that the users can navigate to another page.

Thanks
Posted 2-Sep-12 22:58pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Hi ,
Check this
<a href="Default.aspx"><img src="images/Good-mark.png" /></a>
       <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default3.aspx"><img src="Good-mark.png" /></asp:HyperLink>

Best Regards
M.Mitwalli
  Permalink  
Comments
Ranjith Reddy CSE 3-Sep-12 5:38am
   
Boss, I need to add Hyperlink on the IMAGE. Please help me.

When the user clicks that hyperlink..it must navigate to another page.

I should Redirect to another page when Hyperlink clicks But not the Image.

Please help.

I want to Clear is that. HOW TO ADD HYPERLINK ON IMAGE.
Mohamed Mitwalli 3-Sep-12 5:47am
   
Well the example i provided to you simulate what you ask
Manas Bhardwaj 3-Sep-12 6:22am
   
Good +5
Mohamed Mitwalli 3-Sep-12 6:27am
   
Thank you Manas
Prasad_Kulkarni 3-Sep-12 7:09am
   
5'ed
Mohamed Mitwalli 3-Sep-12 7:14am
   
Thanks Prasad :)
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Hi,

What i understand from your question is, you want a button on the image. button should be display like it is placed on the image. correct?

If so, you can do that using Absolute position of your control.

<div>
        <asp:Image ID="Image1" style="position:absolute"  runat="server" ImageUrl="~/Water lilies.jpg" />
        <asp:Button ID="Button1" runat="server" style="position:absolute" Text="Button" />
    </div>
Above code is just sample.you need to do some more adjustment and margin with the button control to adjust on desired location. Disadvantage of above resolution is, you can not control on screen resolution. your design will not be looked similar in all monitors with different resolution.

Hope something from above lead you to solution,
Thanks
-Amit Gajjar
  Permalink  
Comments
Manas Bhardwaj 3-Sep-12 6:22am
   
5+
@amitgajjar 3-Sep-12 6:23am
   
Thanks
Ranjith Reddy CSE 3-Sep-12 6:33am
   
Many Thanks
@amitgajjar 3-Sep-12 6:41am
   
Your welcome.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Try This
Put a ImageButton Control,place it where you want it.
<asp:imagebutton id="ImageButton1" runat="server" backcolor="#FF6699" xmlns:asp="#unknown">
            Height="20px" ImageAlign="Middle" ImageUrl="~/Images/goback3.JPG" />
and Just on click event of ImageButton
Response.Redirect("pageWhereYouWantToGo.aspx?parameter=" + parameterToSend.Text + "")
  Permalink  
Comments
Ranjith Reddy CSE 3-Sep-12 5:38am
   
Boss, I need to add Hyperlink on the IMAGE. Please help me.

When the user clicks that hyperlink..it must navigate to another page.

I should Redirect to another page when Hyperlink clicks But not the Image.

Please help.

I want to Clear is that. HOW TO ADD HYPERLINK ON IMAGE.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

Why dont you using LINKLABEL control.
Place the linkLabel below your Image.
and on CLick event of the LinkLabel,Redirect to Another Page.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 5

hi,

you can try the following code for that.

<div>
<asp:image id="Image1" style="position:relative" runat="server" imageurl="1.jpg" xmlns:asp="#unknown" />
</div>
<div>
<asp:button id="Button1" runat="server" style="position:absolute" text="Button" xmlns:asp="#unknown" />
</div>

Also set the Margin in the button div. It will give you desired position.
like :

margin : -160px 0 0 85px;

I hope it will help you,

Thanks,
Viprat
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 6

how to insert image asp.net code
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 7

How to hyperlink filter in editor
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 23 Jun 2014
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100