You are on page 1of 1

Registration page:

using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;
System.Data.OleDb;

namespace home_project
{
public partial class register : System.Web.UI.Page
{
OleDbConnection regcon = new
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\\Users\\BALAYOGI\\Documents\\HOME PROJECT.accdb");
protected void Page_Load(object sender, EventArgs e)
{
Label4.Visible = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
OleDbCommand regcom = new OleDbCommand("insert into
registertable(uname,pass1,pass2)values('"+TextBox1 .Text+"','"+TextBox2 .Text
+"','"+TextBox3 .Text +"')");
regcon.Open();
regcom.ExecuteNonQuery();
regcon.Close();
if (TextBox2.Text.Equals(TextBox3.Text))
{
Response.Redirect("http://localhost:55096/login.aspx");
}
else
{
Label4.Visible = true;
}
}
}
}

You might also like