protected void btnSubmit_Click(object sender, EventArgs e) { try { con2.Open(); cmd = new SqlCommand("USP_INSERT_STUDENT_NOTICE",con2); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@NOTICEDISPLAY_DATE", txtnoticedate.Text); cmd.Parameters.AddWithValue("@NOTICE_TITLE", txtnoticetitle.Text); cmd.Parameters.AddWithValue("@NOTICE_BODY", txtnoticebody.Text); int rows = cmd.ExecuteNonQuery(); if (rows>0) { Response.Write("<script>alert('Data Inserted Succesfully');</script>"); GridView1.DataBind(); Response.Redirect("~/Admin/AddStudentNotice.aspx"); // con2.Close(); } }
TextBox
LinkButton
GridView
DataKey
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)