コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Request.IsSecureConnection)
     {
         if (!Session["AccountStatus"].Equals("AdminAccount"))
         {
             // returns active products
             productsRepeat.DataSource = ProductItem.getActiveProducts();
             productsRepeat.DataBind();
         }
         else
         {
             Response.Redirect("~/UL/Error");
         }
     }
     else
     {
         string url = ConfigurationManager.AppSettings["UnsecurePath"] + "Products";
         Response.Redirect(url);
     }
 }