Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
pls some one one tell that how to do updation in gridview of images, i am able to do updation in text and fill to text boxes outside the gridview but how should i do for images my code is


C#
protected void showDataTable()
   {
       //DataTable dt = dbHelper.returnDataTable("select * from Emp_Mast where E_Id='" + ViewState["id"] + "' and isDeleted=0");

       SqlCommand cmd = new SqlCommand("select * from tbl_Products",con);
       SqlDataAdapter DA = new SqlDataAdapter(cmd);
       DataTable dt = new DataTable();
       DA.Fill(dt);
       if (dt.Rows.Count > 0)
       {
           txttitle.Text = dt.Rows[0]["Title"].ToString().Trim();
           txtdescrip.Text = dt.Rows[0]["description"].ToString().Trim();
           txtUserId.Text = dt.Rows[0]["E_Login"].ToString().Trim();
           //txtPassword.Text = dt.Rows[0]["E_Pwd"].ToString().Trim();
           txtPassword.Text = "*****";
           txtUserId.ReadOnly = true;
           txtPassword.ReadOnly = true;
           //ddlBranch.SelectedValue=int.Parse(dt.Rows[0]["B_Id"].ToString());
           string mc = dt.Rows[0]["B_Id"].ToString();
           try
           {
               ddlBranch.SelectedValue = mc;
           }
           catch
           {
               ddlBranch.SelectedIndex = 0;
           }

       }


pls some one tell for images.....
Posted
Updated 20-Aug-12 2:49am
v2
Comments
AmitGajjar 20-Aug-12 8:57am    
similar question : http://www.codeproject.com/Questions/409029/How-to-update-an-image-in-Asp-net-grid-view-on-aft.aspx
ZurdoDev 20-Aug-12 10:57am    
Just set the source of the image. Can you show what code you do have?

1 solution

You're doing a postback, so you have full control. Just set the path in the img tag to the right image. I see no code to set images here at all.
 
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