SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=PROMOD-PC;Initial Catalog=travel_Directions;Integrated Security=True";
DataTable dt = new DataTable();
String selQuery = "SELECT Image FROM MapDataImage WHERE Source='" + TextBox1.Text + "';";
SqlCommand SelCmmnd = new SqlCommand(selQuery);
SqlDataAdapter sDatAdp = new SqlDataAdapter();
SelCmmnd.CommandType = CommandType.Text;
SelCmmnd.Connection = con;
con.Open();
sDatAdp.SelectCommand = SelCmmnd;
sDatAdp.Fill(dt);
ListView1.DataSource = dt;
ListView1.DataBind();
con.Close();
sDatAdp.Dispose();
con.Dispose();
dt.Dispose();
伙计们现在代码已准备好...(执行时没有错误)但是当我单击按钮时...它将显示像 Image: System.Byte [].... 在列表视图中的标签代码中是否有任何问题?
这段代码错了吗?有人请帮帮我吗?要弄清楚这个…………