Getting the Value of A Variable from another file C# : I have 2 files and in the 1st file, I have textbox where the user can enter a value. I want to take that value and bring it to the other file. In that program, I have the user entering a value also in a textbox. If the value they enter is higher than the other you get an error.

For example: File 2 ask how many snickers you want to eat and File 1 (ask the user how many snickers we have). If what you want to eat is more than what you have you get an error. 

I'm not sure how I can get this value in the other file.

FILE 1: 

    protected void Page_Load(object sender, EventArgs e)
        { 
                //create string and set it equal to the textbox text
                string snickersInventory = txtInventorySnickers.Text;
                //create a int and turn the string into an int
                int stockSnickers = Int32.Parse(snickersInventory);

         }

FILE 2:

    protected void btnSubmit_Click(object sender, EventArgs e)
        {
          //Check to see if the stockSnickers is lower than the amount of Snickers Value
        }

 