title: is there any code to retain the value in arraylist in C# when page is refreshed or reloaded
body: <p>Is there any way to keep the value in the arraylist even after the page is loaded because I need the stored values for verifying afterwards.</p>
  
  <p>I tried Http Cookie set also but not able to find it. Pls help</p>
  
  <pre><code> for (int i = 1; i &lt;= random2; i++)
              {
                  //   int total_checkbox = Total_Count_Checkbox;
  
  
                  int div = (int)al[i - 1] / 10; //div is the page number of the element
                  int mod = (int)al[i - 1] % 10; //mod is checkbox number of the element
  
                  if (mod == 0)       //for checking inf the number comes to be 10
                  {
                      div = div - 1;
                      mod = 10;
                  }
                  if (div == 0)
                  {
                      LiSt3[mod - 1].Click();           //Clicking for the same page elements
                  }
                  else
                  {
                      for (int b = 2; b &lt;= div; b++)         //checking for the other pages
                      {
                          Browser.Click("Saved_Estimates", "Forward_Link_normal");
                          Thread.Sleep(1000);
                      }
                      IList&lt;IWebElement&gt; LiSt4 = driver.FindElements(By.CssSelector(".checkbox.checkbox-success.ng-scope"));
                      LiSt4[mod - 1].Click();             //clicking for the other page elements
                  }
                  Browser.WaitforthePageLoad();
                  IList&lt;IWebElement&gt; LiSt_of_Names_Summary_List = driver.FindElements(By.CssSelector("span[data-bo-bind='item.Name']"));
                  IList&lt;IWebElement&gt; LiSt_of_Dates_List = driver.FindElements(By.CssSelector("span[data-bo-bind='item.GeneratedDateString']"));
                  IList&lt;IWebElement&gt; LiSt_of_Times_List = driver.FindElements(By.CssSelector("span[data-bo-bind='item.GeneratedTimeString']"));
                  IList&lt;IWebElement&gt; LiSt_of_Last_Day_Worked_List = driver.FindElements(By.CssSelector("div[data-bo-bind='item.LastDayWorkedDateString']"));
                  IList&lt;IWebElement&gt; LiSt_of_Benifit_Commencement_List = driver.FindElements(By.CssSelector("div[data-bo-bind='item.BenefitCommencementDateString']"));
                  Browser.WaitforthePageLoad();
  
                  LiSt_of_Names_Summary_List_Arraylist.Add(LiSt_of_Names_Summary_List[mod - 1]);
                  LiSt_of_Dates_List_Arraylist.Add(LiSt_of_Dates_List[mod - 1]);
                  LiSt_of_Times_List_Arraylist.Add(LiSt_of_Times_List[mod - 1]);
                  LiSt_of_Last_Day_Worked_List_Arraylist.Add(LiSt_of_Last_Day_Worked_List[mod - 1]);
                  LiSt_of_Benifit_Commencement_List_Arraylist.Add(LiSt_of_Benifit_Commencement_List[mod - 1]);
  
                  if (div != 0)
                  {
                      for (int b = 2; b &lt;= div; b++)
                      {
                          Browser.Click("Saved_Estimates", "Back_Arrow_normal");
                          Thread.Sleep(1000);
                      }
                  }
              }
  </code></pre>