Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Controller controller = new Controller();
            int ProductID = 0;
            MyssProduct product;

            if (!IsPostBack)
            {
                var id = Request.QueryString["id"];
                if (!string.IsNullOrEmpty(id))
                {
                    if (Helper.IsNumeric(id))
                    {
                        ProductID = Int32.Parse(id);

                        try
                        {
                            product = controller.getProduct(ProductID);
                        }
                        catch (Exception ex)
                        {
                            throw ex;
                        }
                        ProductTitle.Text = "Thank you for purchasing";
                        ProductTitle1.Text = product.ProductName;

                    }
                    else
                    {
                        Response.Redirect("http://www.myss.com/");
                    }
                }
                else
                {
                    Response.Redirect("http://www.myss.com/");
                }
            }
            else
            {

            }
        }