如何通过选择链接按钮在gridview中更新图像 [英] how to do update images in gridview by select a link button

查看:89
本文介绍了如何通过选择链接按钮在gridview中更新图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请有人告诉我如何在图像的gridview中进行更新,我可以在文本中进行更新并填充到gridview之外的文本框中,但是我应该如何处理图像,我的代码是


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


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.....

推荐答案

您正在回发邮件,因此您拥有完全的控制权.只需将img标签中的路径设置为正确的图像即可.我根本看不到任何在此处设置图像的代码.
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.


这篇关于如何通过选择链接按钮在gridview中更新图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆