62,050
社区成员
发帖
与我相关
我的任务
分享
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=.\\sqlexpress;Initial Catalog=kk;Integrated Security=True");
con.Open();
string sqlstr=string.Format("select ImageList from Picture where time='{0}' and huowuid='{1}'",DropDownList1.SelectedValue, Request.QueryString["value"]);
SqlCommand com = new SqlCommand(sqlstr, con);
SqlDataReader dr = com.ExecuteReader();
if (dr.Read())
{
Response.BinaryWrite((byte[])dr["ImageList"]);
}
Response.End();
con.Close();
}