this is my code. i am inserting the value in database.but topic column is always empty userby and date is inserted properly. tell me what i have to do so that all the values can be inserted.
try
{cn.Open();
string sql1 = "insert into Topics(Topic,UserBy,Date)values('" + TextBoxScrap.Text + "','" + Session["uname"].ToString() + "','" + DateTime.Now.ToString() + "')";
SqlCommand cmd = new SqlCommand(sql1, cn);
cmd.ExecuteNonQuery();
cn.Close();
TextBoxScrap.Text = "";
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
Rupali ShindePosted Nov 6, 2015, 3:41 AM
Hajinder JassalPosted Nov 6, 2015, 2:19 AM
Rajeesh MenothPosted Nov 6, 2015, 1:33 AM
Hajinder JassalPosted Nov 6, 2015, 1:13 AM
Rupali ShindePosted Nov 5, 2015, 11:55 PM
Praveen DhatrikaPosted Nov 5, 2015, 2:30 PM