protected void Page_Load(object sender, EventArgs e) { SQLDataClass.getAllProducts(); if (!IsPostBack && (bool)Application["Prog2_Computed"]) { txtID.Text = (string)Application["Prog2_ProductID"]; txtQuantity.Text = (string)Application["Prog2_ProductQuantity"]; txtPrice.Text = (string)Application["Prog2_ProductPrice"]; CalculateTotals(); } txtID.Focus(); }
void Application_Start(object sender, EventArgs e) { // Code that runs on application startup RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //Prog2 Application["Prog2_ProductID"] = ""; Application["Prog2_ProductPrice"] = ""; Application["Prog2_ProductQuantity"] = ""; Application["Prog2_Computed"] = false; //Prog3 Application["Prog3_Index"] = 0; Application["Prog3_ID"] = ""; SQLDataClass.setupProdAdapter(); }
protected void Page_Load(object sender, EventArgs e) { SQLDataClass.getAllProducts(); }