Solved

opening a gridview image in new page

Posted on 2011-09-23
4
160 Views
Last Modified: 2012-05-12
i have a grid view control in c#.one of the itemtemplate field contain the link to an image.
iwant that when user clicks that field image shud be displayed in a new popup window
0
Comment
Question by:ASPNET_8
  • 2
4 Comments
 
LVL 17

Expert Comment

by:sonawanekiran
ID: 36586117
Add link button to  aspx page
<asp:linkbutton id="LinkButton1"
       text="Open Web site"
       onclientclick="open_popup('your_image_path')"
       onclick="LinkButton1_Click"
       runat="Server" />

Open in new window


Your javascript contain
function open_popup(path)
      {
         window.open(path);
      }

Open in new window

0
 
LVL 17

Accepted Solution

by:
sonawanekiran earned 250 total points
ID: 36586121
Remove onclick event from button

<asp:linkbutton id="LinkButton1"
       text="Open Image"
       onclientclick="open_popup('your_image_path')"
       runat="Server" />
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 36586406
0
 

Author Closing Comment

by:ASPNET_8
ID: 36953731
gOOD
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

790 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