string strcon = "data source=.;initial catalog=LianXi ;User id=sa;password=1a2b3c";
SqlConnection conn = new SqlConnection(strcon);
conn.Open();
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "select images from T_Photo where id=1";
DataTable dt = new DataTable();
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(dt);
Image1.ImageUrl= dt.Rows[0]["images"].ToString();
SqlConnection conn = new SqlConnection(strcon);
conn.Open();
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "select images from T_Photo where id=1";
DataTable dt = new DataTable();
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(dt);
Image1.ImageUrl= dt.Rows[0]["images"].ToString();