AnkitPal says:
protected
void
btnsave_Click(
object
sender, System.EventArgs e)
{
cnn.Open();
cmd.ExecuteNonQuery();
{
string
script =
@"<script language = ""javascript"">
alert('Dear Student Your Query has been Sent to ECC.');
</script>;"
;
Page.ClientScript.RegisterStartupScript(
this
.GetType(),
"myJScript1"
, script);
}
}
Replace the above with the below code.
protected void btnsave_Click(object sender, System.EventArgs e)
{
//connectionstrings
cnn.Open();
//insert command
cmd.ExecuteNonQuery();
string script = @"<script language = ""javascript"">
alert('Dear Student Your Query has been Sent to ECC.');
</script>;";
Page.ClientScript.RegisterStartupScript(this.GetType(), "myJScript1", script);
Response.Redirect(Request.Url.AbsoluteUri);
}