在ASP.net中的页面之间传递数据 [英] Passing data between pages in ASP.net

查看:128
本文介绍了在ASP.net中的页面之间传递数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我正在一个网页上接受数据并在另一页上显示数据.我尝试使用会话变量进行此操作,但是一旦关闭浏览器,我显示的数据就会消失.基本上,我希望即使关闭浏览器也能保留该信息.所以可以做什么呢?

谢谢

in my application i am accepting data in one web page and displaying it on other page. i tried this using session variables but as soon as close browser the data that i am displaying goes. basically i want that information to remain even if browser is closed. so what can be done for this.

thank you

推荐答案

对于您的要求,看来您必须将数据保存在数据库中,以便即使在关闭浏览器后也可以检索数据.
For your requirement, it seems that you have to save the data in your DataBase so that you can retrieve it even after the browser is closed.


您可以将数据保存在数据库中并在其他页面中提取



您可以使用跨页回发

请检查链接

http://aspdotnetfaq.com/Faq/How-to-使跨页面回发ASP-Net.aspx [
you can save your data in data bas and fetch in anther page

OR

you can use cross page post back

please check the link

http://aspdotnetfaq.com/Faq/How-to-make-Cross-Page-Postback-in-ASP-Net.aspx[^]


这是一种状态管理概念.
Viewstate,Sesion,Querystring,hiddenFields允许您在页面之间传递值,但在浏览器关闭后无法保留信息.
原因,当您关闭浏览器并重新打开它时,将为该浏览器分配一个新的会话.

要完成任务,您需要使用 Cookies databse 将值保存在Extrafile 中,以持久保存数据.
It''s a state management concept.
Viewstate, Sesion, Querystring, hiddenFields are allow you to pass values between pages but unable to persist information after browser close.
cause when you close browser and reopen it, a new session is assigned with that browser.

To accomplish your task, you need to take use of Cookies or databse or store value in extrafile that will persist your data.


这篇关于在ASP.net中的页面之间传递数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆