Example #1
0
        // Raised when the page is loaded
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "Home Page";

            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.QueryString["removedFirstName"]) && !string.IsNullOrEmpty(Request.QueryString["removedLastName"]))
                {
                    ShowSuccessMessage(studentController.BuildSucessfulRemovalMessage(Request.QueryString["removedFirstName"], Request.QueryString["removedLastName"]));
                }

                try
                {
                    studentController.GetAllStudentsAndBindToRepeater(ref StudentsRepeater);
                }
                catch (DatabaseException ex)
                {
                    ShowErrorMessage(ex.Message);
                }
                catch (System.Exception ex)
                {
                    ShowErrorMessage("The system failed with the following message: " + ex.Message);
                }
            }
        }