//連接數據庫
protected void btnConn_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString = "server=PC-4355211\\SQLEXPRESS;Initial Catalog=northwind;"
+ "User ID=qq;Password=qqpassword";
conn.Open();
lblResult.Text = "連接成功了";
conn.Close();
conn.Dispose();
}
//重點