传递asp.net页面之间的数据 [英] Passing data between asp.net pages

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

问题描述

我不知道什么是通过大量的多页之间的值的最佳方式的意见。我在想的任何设置值保存至数据库,采用context.Items [],或会议[]。我不知道什么是最好的方法。我可能经过约40 variables.This会期间结帐过程,使他们应当通过用户生命周期的持久化。它们被输入的第一时间之后用户没有改变的值。该值会像帐单地址,姓氏和名字等。

I'm wondering the opinion of what is the best way to pass a lot of values between MULTIPLE pages. I was thinking of either saving the values to a database, using context.Items[], or Session[]. I'm not sure about what is the best method. I'm passing probably around 40 variables.This will be during a checkout process so they should be persisted through the users lifecycle. The user does not change the values after they are entered the first time. The values would be like Billing Address, First and Last name etc

推荐答案

会话可能是最有效的。然而,如果会话超时或丢失任何其他原因,任何条目都将丢失。所以,如果持续性更重要的是,你可能希望将其存储在数据库中。

Session is probably the most efficient. However, if the session times out or is lost for any other reason, any entries are lost. So if persistence is more important, you may want to store it in the db.

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

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