Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 .NET4
Hi,
 
In datagridview have three columns.
======================================================
ImageType|| imageurl(linkButton)|| delete(button)||
======================================================
Face ||d:\Temp\Face.jpg || delete||
FullImage ||d:\Temp\FullImage .jpg || delete||
======================================================
// 
// ImageType // 

this.ImageType.HeaderText = "ImageType";
 this.ImageType.Name = "ImageType"; 
// 

// Attachment //

this.Attachment.HeaderText = "Attachment"; 
this.Attachment.Name = "Attachment"; 
this.Attachment.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.Attachment.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; 
this.Attachment.Width = 130; 
// 

// DeleteImg // 

this.DeleteImg.FillWeight = 50F; 
this.DeleteImg.HeaderText = "Delete"; this.DeleteImg.Name = "DeleteImg"; 
this.DeleteImg.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.DeleteImg.Width = 50; 
 
// code : 
if (File.Exists(imagePath)) { string result = Path.GetFileNameWithoutExtension(imagePath); string[] row = new string[] { result, imagePath }; dataGridViewAttachment.Rows.Add(row); }
 
how to write code to open image this pathUrl(d:\Temp\Face.jpg ).
Karthikeyan,
Posted 28-Sep-12 20:15pm
Edited 28-Sep-12 21:53pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

on the gridviewrowcommand get the unique id and do response.redirect("http://.../face.jpg", false)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 494
1 CHill60 405
2 OriginalGriff 345
3 PIEBALDconsult 285
4 BillWoodruff 213


Advertise | Privacy | Mobile
Web02 | 2.8.141015.1 | Last Updated 29 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100