title: Error: Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation
body: <p>I want to display Agendas from table "tblAgenda" using Asp.net here is the query:</p>
  
  <pre><code>public static List&lt;int&gt; SelectByYear()
      {
          DbManager db = new DbManager();
          try
          {
              List&lt;int&gt; list = new List&lt;int&gt;();
              var result = from p in db.tblAgenda
                           group p by p.News.Value.Year
                               into g
                               select new { Year = g.Key, Releases = g };
              foreach (var obj in result)
              {
                  list.Add(obj.Year);
              }
              list.Reverse();
              return list.ToList&lt;int&gt;();
          }
          catch
          {
              return null;
          }
          finally
          {
              db.Dispose();
          }
      }
  </code></pre>
  
  <p>and here I am calling the above method:</p>
  
  <pre><code>public partial class edd_Default : System.Web.UI.Page
  {
  
      protected void Page_Load(object sender, EventArgs e)
      {
              if (string.IsNullOrEmpty(Request.QueryString["id"]))
              {
                  RecentData();
              }
          }
      }
  
      private void RecentData()
      {
          List&lt;tblAgenda&gt; agd = new List&lt;tblAgenda&gt;();
          StringBuilder sbHeadings = new StringBuilder();
          StringBuilder sbData = new StringBuilder();
          List&lt;int&gt; list1 = AgendaManager.SelectByYear();
          if (list1 != null)
          {
              List&lt;int&gt; list = list1.Take(3).ToList&lt;int&gt;();
              int Row = 0;
              string RowCss = "";
              foreach (tblAgenda ob in agd)
              {
                  strYears = "";
  
                  if (list.Count &gt; 0)
                  {
                      Table tblHead = new Table();
                      TableRow trHead = new TableRow();
                      TableCell tcDvHead = new TableCell();
                      TableCell tcLnkHead = new TableCell();
                      for (int i = 0; i &lt; list.Count; i++)
                      {
                          Row = 0;
                          List&lt;clsAgenda&gt; listData = new List&lt;clsAgenda&gt;();
                          listData = null;
                          DateTime dt = DateTime.Now.AddYears(1);
                          string stryr = strYears;
                          int intyr = Convert.ToInt32(list[i]);
                          diff = Convert.ToInt32(dt.Year) - Convert.ToInt32(intyr);
  
                          if (diff == 0 || diff == 1 || diff == 2)
                          {
  
                              if (drpDepartments.SelectedValue == "-1")
                              {
  
                                  strYears += list[i] + ",";
  
  
                                  sbHeadings.Append("&lt;div id='dv" + list[i] + "' style='float:left;width:60px;cursor:pointer;'  class='btnclass11'&gt;" + list[i] + "&lt;/div&gt;&lt;div style='float:left;'&gt;&amp;nbsp;&lt;/div&gt;");
                                  listData = AgendaManager.SelectAllByYear(Convert.ToInt32(list[i]));
                              }
                              else
                              {
                                  if (AgendaManager.IsAgendExistForDeptartment(Convert.ToInt32(list[i]), Convert.ToInt64(drpDepartments.SelectedValue)))
                                  {
                                      strYears += list[i] + ",";
                                      sbHeadings.Append("&lt;div id='dv" + list[i] + "' style='float:left;width:60px;cursor:pointer;'  class='btnclass11'&gt;" + list[i] + "&lt;/div&gt;&lt;div style='float:left;'&gt;&amp;nbsp;&lt;/div&gt;");
                                  }
                                  listData = AgendaManager.SelectAllByYear(Convert.ToInt32(list[i]), Convert.ToInt64(drpDepartments.SelectedValue));
                              }
                              sbData.Append("&lt;table id='tbl" + list[i] + "' cellspacing='1' cellpadding='4' width='885' style='display:none;margin-top:10px;' class='GridBorder' &gt;");
                              sbData.Append("&lt;tr class='GridViewHeaderStyle' &gt;");
                              sbData.Append("&lt;th style='width:380px;height:22px;text-align:left;'&gt;Meeting&lt;/th&gt;&lt;th style='height:22px;text-align:left;'&gt;Date&lt;/th&gt;&lt;th style='width:70px;height:22px;text-align:left;'&gt;Time&lt;/th&gt;&lt;th style='width:70px;height:22px;text-align:left;'&gt;Agenda&lt;/th&gt;&lt;th style='height:22px;text-align:left;width:120px;'&gt;Web Cast&lt;/th&gt;&lt;th style='height:22px;text-align:left;width:100px;'&gt;Minutes&lt;/th&gt;");
                              sbData.Append("&lt;/tr&gt;");
                              foreach (clsAgenda obj in listData)
                              {
                                  RowCss = "";
                                  if (Row == 1)
                                  {
                                      RowCss = "class='GridRow'";
                                  }
                                  sbData.Append("&lt;tr " + RowCss + "&gt;");
                                  sbData.Append("&lt;td &gt;" + obj.Title + "&lt;/td&gt;");
                                  sbData.Append("&lt;td &gt;" + string.Format("{0:MMM dd, yyyy}", obj.AgendaDate) + "&lt;/td&gt;");
  
                                  sbData.Append("&lt;td &gt;" + obj.Time + "&lt;/td&gt;");
                                  sbData.Append("&lt;td &gt;&lt;a style='color:black;' href='agenda.aspx?id=" + obj.ID + "'&gt;View&lt;/a&gt;&lt;/td&gt;");
  
                                  if (string.IsNullOrEmpty(obj.WebCast))
                                  {
                                      sbData.Append("&lt;td &gt;---&lt;/td&gt;");
                                  }
                                  else
                                  {
                                      sbData.Append("&lt;td &gt;&lt;a style='color:black;' href='" + obj.WebCast + "'&gt;" + obj.WebCastTitle + "&lt;/a&gt;&lt;/td&gt;");
                                  }
  
                                  if (string.IsNullOrEmpty(obj.MinutesFile))
                                  {
                                      sbData.Append("&lt;td &gt;---&lt;/td&gt;");
                                  }
                                  else
                                  {
                                      if (ob.showThroughBroswer == 1)
                                      {
                                          sbData.Append("&lt;td &gt;&lt;a href='downloadfile.aspx?AgendaMinuteId=" + obj.ID + "' target='_blank'&gt;View&lt;/a&gt;&lt;/td&gt;");
                                      }
                                      else
                                      {
                                          sbData.Append("&lt;td &gt;&lt;a href='showpdf.aspx?AgendaMinuteId=" + obj.ID + "' target='_blank'&gt;View&lt;/a&gt;&lt;/td&gt;");
                                      }
                                  }
                                  sbData.Append("&lt;/tr&gt;");
                                  Row++;
                                  if (Row == 2)
                                  {
                                      Row = 0;
                                  }
                              }
                              sbData.Append("&lt;/table&gt;");
  
                          }
                          else
                              break;
                      }
                      if (strYears.Length &gt; 0)
                      {
                          strYears = strYears.Substring(0, strYears.Length - 1);
                      }
                      strFirstYear = list[0].ToString();
                      tcDvHead.Text = sbHeadings.ToString();
  
                      if (diff == 1 || diff == 2)
                      {
                          tcLnkHead.Text = "&lt;div class='dvhrfclass'&gt;&lt;a href='listagendas.aspx?id=pre' class='link1'&gt;Previous Meetings &gt;&gt;&lt;/a&gt;&lt;/div&gt;";
                      }
                      else
                      {
                          tcLnkHead.Text = "";
                      }
                      trHead.Cells.Add(tcDvHead);
                      trHead.Cells.Add(tcLnkHead);
                      tblHead.Rows.Add(trHead);
                      StringWriter sW = new StringWriter();
                      HtmlTextWriter hW = new HtmlTextWriter(sW);
                      tblHead.RenderControl(hW);
                      letHeading.Text = sW.ToString();
                      letData.Text = sbData.ToString();
                  }
              }
          }
      }
  </code></pre>
  
  <p>now the issue is I am getting no values in list1, I have tried using the debugger on the query and found that I can't access the "tblAgenda", its giving an error that: " Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation". I have searched alot but didn't find anything good, my connection string is totally fine because all the other tables are working fine even in "tblAgenda" I can store new agenda from admin panel but I can't retrieve the agendas on front end, what is the issue here?
  Thanks.</p>