protected void register_Click(object sender, EventArgs e)
    {
        string userEmail   = ((TextBox)EmailRegistry.FindControl("EmailRegistry")).Text;
        string firstName   = ((TextBox)FirstNameRegistry.FindControl("FirstNameRegistry")).Text;
        string lastName    = ((TextBox)LastNameRegistry.FindControl("LastNameRegistry")).Text;
        string dateOfBirth = ((TextBox)DateOfBirth.FindControl("DateOfBirth")).Text;
        string password    = ((TextBox)PasswordRegistry.FindControl("PasswordRegistry")).Text;
        string gender      = ((DropDownList)GenderList.FindControl("GenderList")).Text;

        Session["userEmail"] = userEmail;


        string registerSql = "insert into [User](Password, Email, FirstName, LastName, Gender, dateOfBirth) values ('" + password + "','" + userEmail + "','" + firstName + "','" + lastName + "','" + gender + "','" + dateOfBirth + "')";

        function.Create(registerSql);
        Response.Redirect("Homepage.aspx");
    }