コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string sessionUser;
            int    userID;

            try
            {
                DataAccessLayer dao = new DataAccessLayer();
                if (Session["userEmail"] != null)
                {
                    sessionUser     = Session["userEmail"].ToString();
                    hiddenUser.Text = sessionUser;
                    userID          = dao.getUserID(sessionUser);
                    SqlDataReader reader = dao.GetUserProperties(userID, Constants.propertyEnabled);
                    Repeater1.DataSource = reader;
                    Repeater1.DataBind();
                }
                else
                {
                    Response.Redirect("Login.aspx");
                }
            }
            catch (Exception)
            {
                Console.Write("error");
            }
        }