protected void Page_Load(object sender, EventArgs e) { Article1.DataBind(); DropDownList drpDropDownCountry = Article1.ContentPlaceholder.Controls[0].FindControl("drpDropDownCountry") as DropDownList; drpDropDownCountry.Text = "--SelectCountry--"; if (!IsPostBack) { if (Session["clients"] != null) { Panel PanelDirectToLogin = Article1.ContentPlaceholder.Controls[0].FindControl("PanelDirectToLogin") as Panel; PanelDirectToLogin.Visible = false; Panel PanelLogout = Article1.ContentPlaceholder.Controls[0].FindControl("PanelLogout") as Panel; PanelLogout.Visible = true; Panel PanelRegistrationForm = Article1.ContentPlaceholder.Controls[0].FindControl("PanelRegistrationForm") as Panel; PanelRegistrationForm.Visible = false; Panel PanelWarningForm = Article1.ContentPlaceholder.Controls[0].FindControl("PanelWarningForm") as Panel; PanelWarningForm.Visible = true; } else { Panel PanelDirectToLogin = Article1.ContentPlaceholder.Controls[0].FindControl("PanelDirectToLogin") as Panel; PanelDirectToLogin.Visible = true; Panel PanelLogout = Article1.ContentPlaceholder.Controls[0].FindControl("PanelLogout") as Panel; PanelLogout.Visible = false; Panel PanelRegistrationForm = Article1.ContentPlaceholder.Controls[0].FindControl("PanelRegistrationForm") as Panel; PanelRegistrationForm.Visible = true; Panel PanelWarningForm = Article1.ContentPlaceholder.Controls[0].FindControl("PanelWarningForm") as Panel; PanelWarningForm.Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { Article1.DataBind(); Article2.DataBind(); if (!IsPostBack) { Panel PanelMen = Article1.ContentPlaceholder.Controls[0].FindControl("PanelMen") as Panel; Panel PanelWomen = Article1.ContentPlaceholder.Controls[0].FindControl("PanelWomen") as Panel; Panel PanelKids = Article1.ContentPlaceholder.Controls[0].FindControl("PanelKids") as Panel; Session["CollectionsCat"] = "5"; if (Session["GeneralCategoryGenders"] == "1") { PanelMen.Visible = true; PanelWomen.Visible = false; PanelKids.Visible = false; } if (Session["GeneralCategoryGenders"] == "2") { PanelMen.Visible = false; PanelWomen.Visible = true; PanelKids.Visible = false; } if (Session["GeneralCategoryGenders"] == "3") { PanelMen.Visible = false; PanelWomen.Visible = false; PanelKids.Visible = true; } PostCategory(); } }
protected void Page_Load(object sender, EventArgs e) { Article1.DataBind(); if (!this.IsPostBack) { ViewState["LoginErrors"] = 0; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Article1.DataBind(); if (Session["USERS"] != null) { LinkButton lnkuser = Article1.ContentPlaceholder.Controls[0].FindControl("lnkuser") as LinkButton; lnkuser.Text = "HELLO [Admin]: " + (string)(Session["USERS"]); } if (Session["USERS"] == null) { Response.Redirect("Default.aspx?"); } } }
protected void Page_Load(object sender, EventArgs e) { Article1.DataBind(); if (!IsPostBack) { BindDataList(); if (Session["clients"] != null) { Panel PanelRegistration = Article1.ContentPlaceholder.Controls[0].FindControl("PanelRegistration") as Panel; Panel PanelLoginStatus = Article1.ContentPlaceholder.Controls[0].FindControl("PanelLoginStatus") as Panel; PanelLoginStatus.Visible = true; PanelRegistration.Visible = false; } else { Panel PanelRegistration = Article1.ContentPlaceholder.Controls[0].FindControl("PanelRegistration") as Panel; Panel PanelLoginStatus = Article1.ContentPlaceholder.Controls[0].FindControl("PanelLoginStatus") as Panel; PanelLoginStatus.Visible = false; PanelRegistration.Visible = true; } } }