Solved

opening a gridview image in new page

Posted on 2011-09-23
4
163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

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