using using using using using using using using using using using using using
System; System.Collections; System.Configuration; System.Data; System.Linq; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.HtmlControls; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Xml.Linq; System.Data.SqlClient;
public partial class LINK_LOGIN : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["REGISTRATIONConnectionString"].C onnectionString); protected void Page_Load(object sender, EventArgs e) { ValidationSettings.UnobtrusiveValidationMode = UnobtrusiveValidationMode.None; } protected void Button1_Click(object sender, EventArgs e) { con.Open(); SqlCommand cmd = new SqlCommand("insert into RegistrationTable(UserName,Password,ConfirmPassword,Address,Email,MobileNo,Gender,Stat e)Values(@UserName,@Password,@ConfirmPassword,@Address,@Email,@MobileNo,@Gender,@State )", con); cmd.Parameters.AddWithValue("@UserName", TextBox2.Text); cmd.Parameters.AddWithValue("@Password", TextBox3.Text); cmd.Parameters.AddWithValue("@ConfirmPassword", TextBox5.Text); cmd.Parameters.AddWithValue("@Address", TextBox4.Text); cmd.Parameters.AddWithValue("@Email", TextBox6.Text); cmd.Parameters.AddWithValue("@MobileNo", TextBox7.Text); cmd.Parameters.AddWithValue("@Gender", RadioButtonList1.SelectedValue.ToString()); cmd.Parameters.AddWithValue("@State", DropDownList1.SelectedValue.ToString()); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); cmd.ExecuteNonQuery(); con.Close(); if (TextBox3.Text == TextBox5.Text) { Response.Redirect("LINK LOGIN.aspx"); } else { Label16.Text = "Password Not Matched"; }
} }