Add values to global List

I have the following global List -\[code\]List<string> changes = new List<string>();\[/code\]I am trying to add string values to \[code\]changes\[/code\] like so -\[code\] protected void CheckBox1_CheckedChanged(Object sender, EventArgs e) { CheckBox chk = (CheckBox)sender; DataListItem item = (DataListItem)chk.NamingContainer; TextBox txt = (TextBox)DataList1.Items[item.ItemIndex].FindControl("aliasTextBox"); string text = txt.Text; changes.Add(text); }\[/code\]So I am trying to store the strings in changes so that when a user clicks -\[code\]protected void Button5_Click(object sender, EventArgs e) { foreach (string text in changes) { WebService1 ws = new WebService1(); ws.WebMethod(text); } }\[/code\]However when it comes to clicking the button, changes is empty and has no string values stored. How can I store the values in changes to be available on button click?
 
Back
Top