亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

asp.net 臨時(shí)數(shù)據(jù)保存實(shí)現(xiàn)代碼

 更新時(shí)間:2012年04月07日 10:48:40   作者:  
在一個(gè)程序運(yùn)行的時(shí)候往往我們會(huì)回到上一個(gè)頁面,或者我們會(huì)需要當(dāng)時(shí)留在這個(gè)頁面的臨時(shí)數(shù)據(jù),例如,我們用百度搜索“腳本”之后我們會(huì)看到很多那啥我就不再說了??!然后我們返回本來頁面在文本框內(nèi)會(huì)有“腳本”的字樣,我們一下代碼段就是實(shí)現(xiàn)這個(gè)功能
如果你感覺有用的話拷
走的時(shí)候順便頂一下!
復(fù)制代碼 代碼如下:

public MainPage()
{
InitializeComponent();
}
PhoneApplicationService phoneAppService = PhoneApplicationService.Current;
protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
{
phoneAppService.State["myValue"] = textBox1.Text;
base.OnNavigatedFrom(e);
}
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
object someObject;
if (phoneAppService.State.ContainsKey("myValue"))
{
if (phoneAppService.State.TryGetValue("myValue", out someObject))
{
textBox1.Text = someObject.ToString();
}
}
base.OnNavigatedTo(e);
}

作者:MasterMeng

相關(guān)文章

最新評(píng)論