protected void btnShowAppVariables_Click(object sender, EventArgs e) { CarLotInfo appVars = ((CarLotInfo)Application["CarSiteInfo"]); string appState = $"<li>Car on sale: {appVars.CurrentCarOnSale}</li>"; appState += $"<li>Most popular color: {appVars.MostPopularColorOnLot}</li>"; appState += $"<li>Big shot SalesPerson: {appVars.SalesPersonOfTheMonth}</li>"; lblAppVariables.Text = appState; }
protected void btnShowCarOnSale_Click(object sender, EventArgs e) { //lblCurrCarOnSale.Text = string.Format("Sale on {0}'s today!", (string)Application["CurrentCarOnSale"]); CarLotInfo car = ((CarLotInfo)Application["CarSiteInfo"]); string appState = $"<li>Car on sale: [{ car.CurrentCarOnSale }]</li>"; lblCurrCarOnSale.Text = appState; }
protected void btnShowAppVariables_Click(object sender, EventArgs e) { CarLotInfo appVars = ((CarLotInfo)Application["CarSiteInfo"]); string appState = string.Format("<li>Car on sale: {0}</li>", appVars.currentCarOnSale); appState += string.Format("<li>Most popular color: {0}</li>", appVars.mostPopularColorOnLot); appState += string.Format("<li>Big shot SalesPerson: {0}</li>", appVars.salesPersonOfTheMonth); lblAppVariables.Text = appState; }