---
title: "Redirect from the Image Button"  
description: "Redirect from the Image Button"  
author: "Anonymous User"  
published: 2014-09-20  
updated: 2014-09-20  
canonical: https://www.mindstick.com/forum/2260/redirect-from-the-image-button  
category: "asp.net"  
tags: ["c#", ".net", "asp.net"]  
reading_time: 1 minute  

---

# Redirect from the Image Button

I want to [link](https://www.mindstick.com/articles/23633/link-builder) a button to this [website](https://www.mindstick.com/articles/13110/why-copywriting-is-crucial-for-new-website-build) “http://www. timesofindia.indiatimes.com/” When the [user clicks](https://answers.mindstick.com/qa/34556/if-a-user-clicks-all-the-google-ads-on-my-site-is-it-foul) the [image button](https://www.mindstick.com/forum/12796/disable-postback-on-image-button-click-asp). I have searched on the [net](https://www.mindstick.com/articles/23172/login-mywifiext-net-and-setup-your-extender-by-the-advice-of-an-expert) and can't find an exact solution. This is what I have so far

```
<asp:ImageButton ID="ImgButtonTimesOfIndia" runat="server" ="~/Images/TimesOfIndia.png" Width="480px"/>
```

## Replies

### Reply by Anchal Kesharwani

hi Chintoo,\
You can use this code. I hope that it works for you.\

Either use the postback url

```
<asp:ImageButton ID="ImgButtonTimesOfIndia" runat="server" ImageUrl="~/Images/TimesOfIndia.png"  PostBackUrl="http://www.timesofindia.com/" Width="480px" /> 
```

## Or

**ASPX Code**

```
<asp:ImageButton ID="ImgButtonTimesOfIndia" runat="server" ImageUrl="~/Images/TimesOfIndia.png" Width="480px" OnClick="ImgButtonTimesOfIndia_Click"/>
```

**cs file code**

```
protected void ImgButtonTimesOfIndia_Click(object sender, ImageClickEventArgs e)   {       Response.Redirect("http://www.timesofindia.com/");    }
```


---

Original Source: https://www.mindstick.com/forum/2260/redirect-from-the-image-button

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
