将所选图像从gridview插入到c#中的mysql表中

问题描述:

我使用asp.net,c#和mysql。

那么如何将所选图像从gridview插入mysql表?请给我看一些例子。

I use asp.net, c# and mysql.
So how can I insert selected image from gridview to mysql table? Please show me some examples.

foreach (GridViewRow row in gv.Rows)
{
 CheckBox chkBox = row.FindControl("chkSelected") as CheckBox;
 if(chkBox.Checked = true)
  {
   Image img = (Image)row.Cells[1].Controls[1];
   string url = img.ImageUrl;
  }
}





这是您获取所选图像的方法。



This is how you can get the selected images.

>