The below codings allow a multi-dimensional array to be stored in the session state
private void StoreToSession()
{
string[,]initialArray={'A','B'};
Session['sessionvalue']=initialArray;
}
private void ReteriveFromSession()
{
string[,]resultantArray=(string[,])Session['sessionvalue'];
TextBox1.Text=resultantArray[0,0].ToString();
TextBox2.Text=resultantArray[0,1].ToString();
}
Share with