Dictionary<int,> dictionary = new Dictionary<int,>();
if(!Session["ListValue"])
{
dictionary =(Dictionary<int,bool>)Session["ListValue"]
}
index = Convert.ToInt32(e.CommandArgument)
If selectedRow.BackColor = Color.Orange Then
selectedRow.BackColor = System.Drawing.ColorTranslator.FromHtml("#738A9C")
strPanr = selectedRow.Cells(1).Text
if(dictionary.ContainsKey(index))
{
dictionary[index]=false;
}
else
{
dictionary.Add(index,false)
}
Else
selectedRow.BackColor = Color.Orange
strPanr = selectedRow.Cells(1).Text
if(dictionary.ContainsKey(index))
{
dictionary[index]=true;
}
else
{
dictionary.Add(index,true)
}
End If
Session["ListValue"]=dictionary;