Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

How do I take form data and put it 'somewhere'

$
0
0

I have this so basic form and I am lost of how I get the form data out of the event stuff. Basically I want it so that when the user click the button I can see a message that says what each filed was completed as. Eventually I would like to make a json API POST call with it but I'm trying to learn so this is 1 step at a time.

public GreetPage()
    {
        InitializeComponent();
    }

    void Button_Clicked(object sender, EventArgs e)
    {
        // This is the current state I am using this as a place holder
        DisplayAlert.Text
    }
    // returning public string just trying to figure out how to "free" the data
    public string JobNum_Completed(object sender, EventArgs e)
    {
        var jobNumText = ((Entry)sender).Text;
    // This is the current thing I have just tried it is not working and says I can not convert some object type to a string
        return JobNum_Completed;
    }

    void Barcode_Completed(object sender, EventArgs e)
    {
        var barcodeText = ((Entry)sender).Text;
    }

    void Qty_Completed(object sender, EventArgs e)
    {
        var qtyText = ((Entry)sender).Text;
    }

Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>