public partial class AddNews_AddNews : System.Web.UI.Page { protected SqlConnection _connection; protected SqlCommand _command; protected SqlDataAdapter _adp; protected System.Data.DataTable _tbl; protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click1(object sender, EventArgs e) { prepareConnection(); _command.CommandText = "INSERT INTO" + drbdlSection.SelectedItem + "(Title,Contect) VALUES (" + titleTextBox.Text + "," + CKEditor1.Text + ");"; } protected void prepareConnection() { _connection = new SqlConnection(@"Data Source=localhost;Initial Catalog=BrainStorms;User ID=sa;Password=ameer123"); _connection.Open(); _command = new SqlCommand(); _command.Connection = _connection; } }
_command.BeginExecuteNonQuery();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)