title: Windows Phone 7 Navigation
body: <p>I am having a problem with navigating between a MainPage and a details Page. </p>
  
  <p>On the main page the code looks like this: </p>
  
  <pre><code>private void MainPage_Loaded(object sender, RoutedEventArgs e)
      {
            State.Clear();
            List&lt;Level&gt; lst = new List&lt;Level&gt;();
            using (SqliteCommand selectCmd = Constants.conn.CreateCommand())
            {
                Constants.conn.Open();
                selectCmd.Transaction = Constants.conn.BeginTransaction();
                selectCmd.CommandText = " SELECT * FROM Levels";
  
                using (SqliteDataReader reader = selectCmd.ExecuteReader())
                {
  
                    while (reader.Read())
                    {
                        Level lev = new Level();
                        lev.ID = Convert.ToInt32(reader.GetValue(0));
                        lev.Name = reader.GetValue(1).ToString();
                        lev.levelScore = Convert.ToInt32(reader.GetValue(2));
                        lst.Add(lev);
                    }
                }
                selectCmd.Transaction.Connection.Close();
            }
            Constants.conn.Close();
            levelList.ItemsSource = lst;
  
          }
  </code></pre>
  
  <p>It sets the items on the page. I navigate on the detail page. 
  The problem comes when I navigate back to the MainPage... Although the State is Clear and the levelItems is 0 It renders The previous view of the page and when it tries to access the sqlConnection throwsan exception.</p>