Editing image field in gridview by fileUpload

Jul 1 2015 7:45 AM
Hi
 I have two columns in gridview which I want to use template for editing them( web column and image column)
for web column editing I used two textBox as template.one for name of web and another for address.
the code is here:
  string siteNm = ((TextBox)GridView1.Rows[e.RowIndex].Cells[16].Controls[1]).Text;
string siteAddr = ((TextBox)GridView1.Rows[e.RowIndex].Cells[16].Controls[3]).Text;
and for updating information 
  SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings[2].ToString());
SqlCommand cmd = new SqlCommand("update students set stu_img=@7, stu_web_name=@8 , stu_web_addr=@9", con);
cmd.Parameters.AddWithValue("@8", siteNm);
cmd.Parameters.AddWithValue("@9", siteAddr);

con.Open();
cmd.ExecuteNonQuery();
con.Close();
GridView1.EditIndex = -1;
sel();
Now I want to edit image column by fileUpload...I don't know how to write code of this?
 

Answers (2)