Код: Выделить всё
try
{
con.Open();
string pass="abc";
cmd = new SqlCommand("insert into register values('" +
txtName.Text + "','" +
txtEmail.Text + "','" +
txtPhoneNumber.Text + "','" +
ddlUserType.SelectedText + "','" +
pass + "')", con);
cmd.ExecuteNonQuery();
con.Close();
Response.Write("alert('Login Successful')");
}
catch (Exception ex)
{
}
finally
{
con.Close();
}
Подробнее здесь: https://stackoverflow.com/questions/151 ... in-asp-net