Posted on: 10/9/2015 2:09:54 PM | Views : 949

Hi everybody, I have a label with a 90 value .When I click a button the label becomes 80 70 or 60,since it -= a variable connected to that label.It always counts the 90 and can't go below 80 70 60.This is the code :
public partial class Default : System.Web.UI.Page { Powers powers = new Powers(); int airElementalHealth = 90; int earthElementalHealth = 120; protected void Page_Load(object sender, EventArgs e) { airelementalHealthLabel.Text = airElementalHealth.ToString(); ViewState.Add("airElementalhealth", health(airElementalHealth)); } protected void usePowerButton_Click(object sender, EventArgs e) { //airElementalHealth = health(airElementalHealth); airelementalHealthLabel.Text = health(airElementalHealth).ToString(); } private int health( ...

Go to the complete details ...