public string lastPageThatDiffers()
        {
            string thisPage  = PagesVisited.Pop();
            string priorPage = PagesVisited.Pop();

            while (priorPage.Equals(thisPage))
            {
                priorPage = PagesVisited.Pop();
            }
            return(priorPage);
        }
 public string whatPageWouldYouGoBackTo()
 {
     try {
         PagesVisited.Pop();
         string priorPage = PagesVisited.Pop();
         if (priorPage.ToLower().IndexOf("payment") == -1)
         {
             return(priorPage);
         }
         else
         {
             return("Default.aspx");
         }
     } catch (Exception ee) {
         return("Default.aspx");
     }
 }
 public bool canGoBack()
 {
     if (PagesVisited.Count > 1)
     {
         string page1 = PagesVisited.Pop();
         string page2 = PagesVisited.Peek();
         PagesVisited.Push(page1);
         if (page2.ToLower().IndexOf("payment") == -1)
         {
             if (
                 (page2.ToLower().IndexOf("candidates_jobsearch") != -1) &&
                 (page1.ToLower().IndexOf("jobviewpage") != -1)
                 )
             {
                 return(true);
             }
         }
     }
     return(false);
 }