この記事では主にmysqlデータを取得してaspテキストボックスに表示する方法を紹介しますので、必要な方は参考にしてください。
次のようにコードをコピーします。
MySql.Data.MySqlClient を使用します。
MySqlConnection conn = new MySqlConnection("server=(local);database=abc;uid=;pwd=");
conn.Open();
MySqlCommand com = new MySqlCommand("select * from tb_xxjj",conn);
MySqlDataReader dr = com.ExecuteReader();
dr.Read();
TB_xxjj.Text = dr["タイトル"].ToString();
content.Text = dr["content"].ToString();