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;