Code:
public class selectEmployee : BasePage
{
protected string[,] employeeArray = new string[100, 3];
private void Page_Load(object sender, System.EventArgs e)
{
// GET THE RESULTS AND FEED INTO AN ARRAY
populate_employee_array();
if ( !Page.IsPostBack )
{
ViewState["employees"] = employeeArray;
}
}
}
When I do this I get the error "Specified Cast is not valid". If I comment out the line that saves the array into viewstate, the page comes up fine.
Any clues?
- VBRookie