Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个页面gallery.aspx。
在此页面中有 3 个图像按钮。
如何将我的数据库连接到此图像按钮以显示图像?
var con = new SqlConnection(settings.ConnectionString); var cmd = new SqlCommand("Select Photo from Members where Member_No = " + ID, con); con.Open(); Image img = (byte[])cmd.ExecuteScalar(); imageButton.image = img;
var con = new SqlConnection(settings.ConnectionString);
var cmd = new SqlCommand("Select Photo from Members where Member_No = " + ID, con);
con.Open();
Image img = (byte[])cmd.ExecuteScalar();
imageButton.image = img;