protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

        WcfServiceReference.Service1Client sr = new WcfServiceReference.Service1Client();
            passion1.Items.Clear();
            passion2.Items.Clear();
            passion3.Items.Clear();
            foreach (string s in sr.GetAllPassions())
        {
            passion1.Items.Add(s);
            passion2.Items.Add(s);
            passion3.Items.Add(s);
        }
            for(int i = 1; i <= 31; i++)
            {
                daysDb.Items.Add(""+i);
            }
            for (int i = 1; i <= 12; i++)
            {
                monthDb.Items.Add(""+i);
            }
            for (int i = 1901; i <= 2016; i++)
            {
                yearDb.Items.Add(""+i);
            }

            string username = Request.Cookies["userName"].Value;
            User user = sr.GetUserByUsername(username);
            txtRealName.Text = user.Name;
            txtEmail.Text = user.Email;
            txtUsername.Text = user.Username;

            daysDb.SelectedIndex = user.Bday.Day-1;

            monthDb.SelectedIndex = user.Bday.Month-1;

            yearDb.SelectedIndex = user.Bday.Year-1901;

            passion1.SelectedIndex = user.Passion1-1;
            passion2.SelectedIndex = user.Passion2-1;
            passion3.SelectedIndex = user.Passion3-1;
        }
        txtUsername.Text = Request.Cookies["userName"].Value;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            WcfServiceReference.Service1Client sr = new WcfServiceReference.Service1Client();
            passion1.Items.Clear();
            passion2.Items.Clear();
            passion3.Items.Clear();

            foreach (string s in sr.GetAllPassions())
            {

                passion1.Items.Add(s);
                passion2.Items.Add(s);
                passion3.Items.Add(s);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        /*
        DateTime dt = DateTime.Today;
        TimeSpan span = DateTime.Now-dt;
        Response.Write(span.Minutes);
        */

        isSearching = false;
        if (Request.Cookies["userName"] != null)
        {
            theCookie = Request.Cookies.Get("userName");
            String value = theCookie.Value;
            //if (!IsPostBack)
            //{
                WcfServiceReference.Service1Client sr = new WcfServiceReference.Service1Client();
                passion1.Items.Clear();
                passion2.Items.Clear();
                passion3.Items.Clear();

                passion1.Items.Add("None");
                passion2.Items.Add("None");
                passion3.Items.Add("None");
                foreach (string s in sr.GetAllPassions())
                {
                    passion1.Items.Add(s);
                    passion2.Items.Add(s);
                    passion3.Items.Add(s);
                }
               CreateButtons();
            //}
        }
        else
        {
            Response.Redirect("Login.aspx");
        }
    }