こんにちは、SQL Server にデータを挿入したい SQL 文字列があります。N
@value のような値を追加するときの使用方法
SqlCommand cmd = new SqlCommand("Insert into News (News,title) values (@news,@title)", conn);
string news = TextBox1.Text;
string title = TextBox2.Text;
cmd.Parameters.AddWithValue(@"news", news);
cmd.Parameters.AddWithValue(@"title", title);