返回Asp.NET中的第一页后显示页面内容 [英] Display Page Content After Return Back To The First Page in Asp.NET

查看:118
本文介绍了返回Asp.NET中的第一页后显示页面内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi ..

在WebForms中,我有一个包含Some Textboxes的页面。在Textboxes中输入Data并导航到Nextpage后再次通过链接返回第一页。然后第一页的textBoxes中的数据显示为空...但我需要的是文本框中的数据应该保持,即使我从下一页返回(不使用数据库)...请有人帮助我。 ..我是这个概念的新手...



提前感谢

hi..
In WebForms, I have a page containing Some Textboxes..After I enter Data in the Textboxes and Navigate to Nextpage and again i return to the first page through a link..Then the data int the textBoxes of the first page is Showing Empty...But What i need is that the Data In The Textboxes should be remain even i return from the next page (without using Database)...pls someone help me ...i am new to this concept...

thanks in advance

推荐答案

好的让我们看看替代方案:



1.这里可以使用的最佳技术是ASP.NET会话,它使您能够跟踪用户会话当他/她浏览您的网站时。您可以将信息存储在会话对象中。看看这篇文章在ASP.NET中探索会话 [ ^ ]。



2.您可能还希望直接使用cookie,将用户通过cookie获取的信息存储在用户的计算机上,并且当同一用户返回同一页面时,然后从机器上检索cookie中检索值。您可以先阅读初学者指南中的文章。 ASP.NET Cookies [ ^ ]



希望有所帮助。



问候

Pawan
Okay let''s look at the alternatives:

1. The best possible technique that can be used here is ASP.NET Sessions, which enable you to keep track of a user session while he/she navigates through your website. You can store the information in session object. Take a look at this article Exploring Session in ASP.NET[^].

2. you might also want to work with cookies directly, storing information obtained by the user on the user''s machine through cookies and whenever the same user comes back on the same page, then retrieving the values from the cookies if present on the machine. You might start by going through the article present at Beginner''s Guide to ASP.NET Cookies[^]

Hope that helps.

Regards
Pawan


这篇关于返回Asp.NET中的第一页后显示页面内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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