Jason94
Jason94

Reputation: 13620

How can push data from one page to another?

I have multiple settings on one page in my project that I need to push to another page.

There are some vars, guess I could make some get variables on the navigation url, but is there a session or some kind I can use to temporary store the variables?

Upvotes: 0

Views: 99

Answers (1)

Mani
Mani

Reputation: 1374

The best way to have session like treatment is isolatedstroragesettings.

IsolatedStorageSettings settingss = IsolatedStorageSettings.ApplicationSettings;

To store and retrive values you need to do the following:

private void SaveValue()
    {
        settingss["userid"] = "IMMNK";
    }

    private string ReturnValue()
    {
        string value="";
        if (settingss.Contains("userid"))
            settingss.TryGetValue("userid", out value);
        return value;
    }

Upvotes: 1

Related Questions