Web应用程序用于存储临时数据的XML或类 [英] XML or Class For Web Applications to Store Temp Data

查看:103
本文介绍了Web应用程序用于存储临时数据的XML或类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我们想将数据(超过20个控件)从一页传递(存储)到另一页,这对于在Web应用程序XML或Class中使用是有益的

If we Want to pass(store) the data(more than 20 controls) from one page to another page which one is beneficial to Use in Web application XML or Class

推荐答案

任何一种都可以,这实际上取决于您的用法.结构(或类)可能会更容易,因为属性已经公开.而使用XML文件,则需要一个过程来解析和读取它.与冗长的XML相比,序列化的结构在Session中占用的空间更少.
Either one will do, it really just depends on your usage. A struct (or class) may be easier since the properties would already be exposed. Whereas with an XML file you would need a process to parse and read it. A serialized struct would take up less space in Session than verbose XML


对于较小的变量,请使用Session.对于小数据,我认为Struct是您的最佳选择.对于较大的数据,请使用Class.要获取更大的数据,请使用XML.

问候,
爱德华
For a small variable, use Session. For small data, I think Struct would be your best option. For a larger data, use Class. For a more larger data, use XML.

Regards,
Eduard


这篇关于Web应用程序用于存储临时数据的XML或类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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