Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //bind texts and placeholders
            lblChildNickname.Text = Model.Childnicknameplaceholder.Rendered;
            txtChildNickname.Attributes["placeholder"] = Server.HtmlDecode(Model.Childnicknameplaceholder.Text);
            btnSubmit.Text                 = Model.SeeMyRecommendationsText.Rendered;
            hypCompleteProfile.Text        = Model.CompleteMyFullProfileText.Rendered;
            hypCompleteProfile.NavigateUrl = MyProfileStepOneItem.GetCompleteMyProfileStepOne().GetUrl();

            //validators
            valGender.ErrorMessage = DictionaryConstants.TellGenderofChildText;
            Page.ClientScript.RegisterExpandoAttribute(valGender.ClientID, "groupName", uxBoy.GroupName);

            valNickname.ErrorMessage = DictionaryConstants.GiveChildNicknameText;
            valGrade.ErrorMessage    = DictionaryConstants.GiveChildGradeText;

            if (!IsPostBack)
            {
                //bind issue list
                rptIssues.DataSource = ChildIssueItem.GetIssues();
                rptIssues.DataBind();

                //bind grade list
                var grades = GradeLevelItem.GetGrades().Select(x => new ListItem(x.Name, x.ID.ToString()));
                ddlGrades.DataSource     = grades;
                ddlGrades.DataTextField  = "Text";
                ddlGrades.DataValueField = "Value";
                ddlGrades.DataBind();

                ddlGrades.Items.Insert(0, new ListItem()
                {
                    Text = Model.Gradedefaultselection.Rendered, Value = string.Empty, Selected = true
                });
            }
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     btnRegister.Text = DictionaryConstants.JoinGroupButtonText;
     txtScreenName.Attributes["placeholder"] = DictionaryConstants.ScreenNameWatermark;
     hypCompleteMyProfile.Text        = Model.CompleteMyFullProfileText.Rendered;
     hypCompleteMyProfile.NavigateUrl = MyProfileStepOneItem.GetCompleteMyProfileStepOne().GetUrl();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            HomePageItem ContextItem = Sitecore.Context.Item;

            CompleteMyProfileUrl = IsUserLoggedIn
                ? MyProfileStepOneItem.GetCompleteMyProfileStepOne().GetUrl()
                : SignInPageItem.GetSignInPage().GetUrl();

            if (UnauthenticatedSessionMember != null)
            {
                ActiveMember = UnauthenticatedSessionMember;
            }

            //Load Text
            litHelpmsg.Text        = DictionaryConstants.HowCanHelp;
            litStruggle.Text       = DictionaryConstants.ChildStruggles;
            litStruggle2.Text      = DictionaryConstants.ChildStruggles;
            litStruggle3.Text      = DictionaryConstants.ChildStruggles;
            litSelectAll.Text      = DictionaryConstants.SelectAll;
            litChildEnrolled.Text  = DictionaryConstants.ChildEnrolled;
            litChildEnrolled2.Text = DictionaryConstants.ChildEnrolled;
            litComplete1.Text      = DictionaryConstants.CompleteMyProfile;
            btnSubmit.Text         = DictionaryConstants.SeeMyRecommendationsButtonText;

            if (!IsPostBack)
            {
                GetSliderItem(ContextItem);

                InitGuideMe();
            }
            else
            {
                // Non-standard controls used for grades, values stored in hidden field via JS
                if (!String.IsNullOrEmpty(hfGradeChoice.Value))
                {
                    SetSelectedGrade(hfGradeChoice.Value);
                }
            }
        }