xamarin data transfer from another page

Cem Yedikardes 1 Reputation point
2020-05-25T15:34:52.21+00:00

First I am beginner for Xamarin, i want to transfer data Mainpage to Page1 I wrote code but it is not working please help me. Code is below;

Mainpage

public partial class MainPage : ContentPage
{
public string deg3 { get; set; }
public int deg4 { get; set; }
public MainPage()
{
InitializeComponent();
deg3 = entry3.Text;
}
private async void nextpage_Clicked(object sender, EventArgs e)
{
await Navigation.PushModalAsync(new NavigationPage(new Page1()));
new Page1 { deg1 = deg3 };
}
}

Page1

public partial class Page1 : ContentPage
{
public string deg1 { get; set; }
public int deg2 { get; set; }

    private void degeral_Clicked(object sender, EventArgs e)
    {
        entry1.Text = deg1;
    }
    public Page1()
    {
        InitializeComponent();

    }
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
27,031 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Dave Patrick 352.4K Reputation points MVP
    2020-05-25T15:39:00.88+00:00

    I'd try asking for help in dedicated Xamarin forums here.

    https://forums.xamarin.com/


    --please don't forget to Accept as answer if the reply is helpful--

    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    0 comments No comments

  2. Cem Yedikardes 1 Reputation point
    2020-05-25T16:15:32.84+00:00

    Sorry I am trying to register forum not accepted :(.

    0 comments No comments

  3. Dave Patrick 352.4K Reputation points MVP
    2020-05-25T16:18:14.177+00:00

    Might want to email them here about registration issues.

    xamarinforums [at] microsoft [dot] com

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  4. Cem Yedikardes 1 Reputation point
    2020-05-25T16:27:07.827+00:00

    I wrote now also forum.xamarin.

    0 comments No comments