Posted on: 4/13/2015 5:52:57 PM | Views : 623

Hello
The below code is working fine but there are some points are not working very well as after i click the button it suppose to show message inside the label and that is not happening as the label don't show any message, 2nd i have question how i can make the code to after inserting process successful then clear the text boxes of the previous texts ??!!! and the last point or question is did the inserting sql statement is written in the safe way to avoid the sql injection 

protected void savenewsbtn_Click(object sender, EventArgs e) { SqlConnection cn = new SqlConnection(sc); SqlCommand cmd = new SqlCommand(); string sqlstatment = @"INSERT INTO News (Title, Descp, Date, Ima1, Ima2, Ima3) VALUES (@Tit,@Decc, @Date, @im1, @im2 , @im3)"; cmd.Connection = cn; cmd.CommandType = CommandType.Text ...

Go to the complete details ...