title: WPF Add Text in Page1, Navigate to Page2, and See it in Page2
body: <p>I need help transferring text from one textbox in one page to another textbox in another page since I'm new to WPF. I was able to change pages, but I can't get the textbox from the first page into the textbox in the second page. It just changes pages but doesn't add in the value from the 1st textbox. I've been looking for help for hours but can't make it work out.</p>
  <p>Page1.xaml:</p>
  <pre><code>&lt;TextBox x:Name = &quot;ATextBox&quot; KeyDown=&quot;AppealNumberTextBoxEnter&quot;/&gt;
  </code></pre>
  <p>Page1.cs:</p>
  <pre><code>            private void AppealNumberTextBoxEnter(object sender, KeyEventArgs e)
      {
          //When Enter Key is pushed in textbox
          if (e.Key == Key.Return)
          {NavigationService ns = NavigationService.GetNavigationService(this);
              ns.Navigate(new Uri(&quot;Page2.xaml&quot;, UriKind.Relative));}
  
              Page2 p2 = new Page2();
              p2.BTextBox.Text = ATextBox.Text;
  </code></pre>
  <p>Page2.xmal:</p>
  <pre><code>&lt;TextBox x:Name = &quot;BTextBox&quot; KeyDown=&quot;BillingDateTextBoxEnter&quot;/&gt;
  </code></pre>
  <p>Page2.cs:</p>
  <pre><code>private void BillingDateTextBoxEnter(object sender, KeyEventArgs e)
      {
          //When Enter Key is pushed in textbox
          if (e.Key == Key.Return)
          {
              MessageBox.Show(&quot;Find Billing date for: &quot; + BTextBox.Text);
          }
      }
  </code></pre>