How do I open a link in a new page using ASP.NET C#

Posted on 2009-04-28
Last Modified: 2013-12-17
I need to amend an old application that was written using c# 1.1 framework. I have the attached image button that I want to link to a url that opens in a new page. I tried Response.Redirect but I can't seem to get the url to open in a new page? Can anyone help?
<asp:imagebutton id="imgClientStandardRates" runat="server" ImageUrl="../img/AR Status/x.gif"></asp:imagebutton>

private void imgClientStandardRates_Click(object sender, System.Web.UI.ImageClickEventArgs e)




Open in new window

Question by:Shepwedd
    LVL 33

    Accepted Solution

    Use a HyperLink instead of an ImageButton, then set the ImageUrl property of the HyperLink and it should show up as a clickable image, instead of an underlined text link.  Then you can set the Target property to "_blank."

    Is the code you wrote above all that needs to happen when this object is clicked?
    LVL 26

    Expert Comment

    by:Anurag Thakur
    Response.Redirect("", false);

    Author Comment


    yip, upon clicking the image I just want to navigate to a url but within a new page. Your solution worked, thanks!


    your solution didn't make any difference.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now