private void LoadUserControls() { Session["username"] = "******" + profile["firstname"]; addVideo uc_videoPage = (addVideo)LoadControl("~/addVideo.ascx"); uc_videoPage.name = profile["firstname"] + " " + profile["lastname"]; addVideoContent.Controls.Add(uc_videoPage); termsAndConditions uc_terms = (termsAndConditions)LoadControl("~/termsAndConditions.ascx"); termsandCs.Controls.Add(uc_terms); videoList uc_videoList = (videoList)LoadControl("~/videoList.ascx"); uc_videoList.userId = userId; videoListcontent.Controls.Add(uc_videoList); uc_viewFinancials yourmoney = (uc_viewFinancials)LoadControl("~/uc_viewFinancials.ascx"); plc_addImage.Controls.Add(yourmoney); //uc_AddImage uc_addImage = (uc_AddImage)LoadControl("~/uc_AddImage.ascx"); //plc_addImage.Controls.Add(uc_addImage); ////uc_addcontent uc_AddContent = (uc_addcontent)LoadControl("~/uc_addcontent.ascx"); ////addContentPlacehoder.Controls.Add(uc_AddContent); uc_addcontent uc_termsNCondition = (uc_addcontent)LoadControl("~/uc_addcontent.ascx"); termsNConditionPlaceholder.Controls.Add(uc_termsNCondition); LoadProfileControl(profile); CanUserViewFinancials = SetViewFinancials(profile["active"]); }
protected void Page_Load(object sender, EventArgs e) { uc_viewFinancials yourmoney = (uc_viewFinancials)LoadControl("~/uc_viewFinancials.ascx"); fin.Controls.Add(yourmoney); }