title: how to move from one page to another from button click in Xamarin.forms
body: <p>I just wanted to know that how to move from one Content Page to another Content Page..Please review the <strong>elseif()</strong> code ..What I  have to write in that block so that I could move to another Content Page(named as MainView.cs).. </p>
  
  <pre><code> button.Clicked += (sender, e) =&gt;
          {
              if (String.IsNullOrEmpty(username.Text) || String.IsNullOrEmpty(password.Text))
              {
                  DisplayAlert("Oops!!Validation Error", "Username and Password are required", "Re-try");
              }
  
              else if (username.Text == "kanak" &amp;&amp; password.Text == "1234")
              {
                 // your code here                   
              }
              else
              {
                  DisplayAlert("Failed", "Invalid User", "Login Again");
              }
          };
  </code></pre>
  
  <p>Any help is appreciated..</p>