Quote:
string connStr = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; SqlConnection conn = new SqlConnection(connStr); string strddl; SqlCommand cmdddl;
Quote:
try { conn.Open(); strddl = "INSERT INTO Users (Username,Name,UserID,Password,UserRoles,SecurityAns) VALUES(@user,@name,@id,@pass,@roles,@Sec)"; cmdddl = new SqlCommand(strddl, conn); cmdddl.Parameters.AddWithValue("@user", TextBox1.Text); cmdddl.Parameters.AddWithValue("@name", TextBox2.Text); cmdddl.Parameters.AddWithValue("@id", CID); cmdddl.Parameters.AddWithValue("@pass", Password.Text); cmdddl.Parameters.AddWithValue("@roles", Role); cmdddl.Parameters.AddWithValue("@Sec", TextBox6.Text); cmdddl.ExecuteNonQuery(); conn.Close(); } catch (Exception ex) { Response.Redirect("~/ErrorPage.aspx"); }
Dun't know this code may help on u or not, for the parallel processing is mean wht? i just a newbie :-D