- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
private SqlConnection SqlConnection;
private SqlTransaction SqlTransaction;
private SqlCommand SqlCommand;
private SqlDataReader SqlDataReader;
protected void BtnRegister_Click(object sender, EventArgs e)
{
using(SqlConnection connection = new SqlConnection())
{
if(textBoxUsername != null)
{
if(textBoxPassword != null)
{
if(textBoxCountry !=null)
{
if(textBoxCity !=null)
{
SqlCommand.CommandText = "INSERT INTO SiteDB (Username, Password, Email, City, Country)"+
"VALUES ('textBoxUsername', 'textBoxPassword', 'textBoxCountry', 'textBoxCity')";
SqlCommand.ExecuteNonQuery;
}
}
}
}
}
}
Прислали недавно пример кода вместе с резюме на поизицию ASP.NET Developper.