protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int orderId = PageTools.GetSavedId("OrderId", Request.QueryString["id"]); if (orderId == 0) Response.Redirect("OrderActive.aspx"); AdminOrderBiz biz = new AdminOrderBiz(); int status = biz.GetOrderStatus(orderId); if (status != 2) { PageLogic.ShowError("Order's status incorrect. Please check.", "OrderDetail.aspx"); return; } int scheduleId = biz.GetOrderScheduleId(orderId); OrderInfoCtl1.OrderId = orderId; OrderInfoCtl1.DataBind(); CompareValidator rv = fvCreditCard.FindControl("CompareValidator1") as CompareValidator; if (rv != null) { rv.ValueToCompare = biz.GetBalance(orderId).ToString(); } } }