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); }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5