?
Solved

opening a gridview image in new page

Posted on 2011-09-23
4
Medium Priority
?
164 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 750 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

801 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