Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In datagridview have three columns.
======================================================
ImageType|| imageurl(linkButton)|| delete(button)||
======================================================
Face ||d:\Temp\Face.jpg || delete||
FullImage ||d:\Temp\FullImage .jpg || delete||
======================================================

C#
// 
// 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
Updated 28-Sep-12 21:53pm
v2

1 solution

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

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900