Torna al Thread
query = "INSERT INTO AnagraficaStagisti(Nome, Cognome, DataNascita, LuogoNascita, Ruolo) VALUES ('" + nome + "','" + cognome + "','" + datanascita + "','" + luogonascita + "','" + ruolo + "')";
comando = new SqlCommand(query, cn);
try
{
comando.ExecuteNonQuery();
}
catch (Exception err)
{
string messaggio = err.Message;
string jsScript = @"
alert('Dati già presenti!\nPuoi solo modificarli!');
window.location.href='Home.aspx';";
this.ClientScript.RegisterStartupScript(this.GetType(),
"Some Title",
jsScript,
true);
}