This c# code works fine in wpf framework.
Now I need this code in asp.net.
I am using GridView instead of DataGrid.
What changes do I have to do?
Here is my c# code:
DataRowView SelectedRowValue = (DataRowView)dataGrid1.SelectedValue;
byte[] ImageBytes = (byte[])SelectedRowValue.Row.ItemArray[1];
MySqlCommand cmd2 = new MySqlCommand("INSERT INTO Images (Image) VALUES (@ImageSource)", con);
cmd2.Parameters.Add("@ImageSource", MySqlDbType.Blob, ImageBytes.Length).Value = ImageBytes;
cmd2.ExecuteNonQuery();