那位大虾能帮我解释一下

andrewz 2003-07-29 03:02:41
[C#]
// C# code from within a page, a handler, or Global.asax.
Session.Contents["Message"] = "MyMsg";
Session.Contents["AppStartTime"] = DateTime.Now;
The StaticObjects collection exposes all variable items that have been added to the session-state collection through <object runat="server"> tags with the scope of "Session" within the Global.asax file. For example:
' Global.asax definition.
<OBJECT RUNAT="SERVER" SCOPE="SESSION" ID="MyInfo" PROGID="Scripting.Dictionary">
</OBJECT>
Objects cannot be added to the StaticObjects collection from anywhere else within an ASP.NET application. The collection throws a NotSupportedException if users attempt to add objects directly through code.
Note The ASP.NET page compiler automatically injects member references into all objects stored within the StaticObjects collection at page compilation time.
Page developers can access Session objects directly at page request time without having to go through the StaticObjects collection, as shown in the following example:
<html>
</body>
Number of entries: <%= MyInfo.Count %>
<body>
</html>

最近一个项目要调查这个asp.net的state
在msdn中看到上文所提到的StaticObjects 和 NotSupportedException这2个概念,想请熟悉的大哥,帮帮小弟,解释一下什么是StaticObjects和,如果让那个NotSupportedException出现

务必帮忙,不胜感激


...全文
107 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
vikey 2003-07-30
  • 打赏
  • 举报
回复
up
andrewz 2003-07-30
  • 打赏
  • 举报
回复
没有人指导吗?
笔试(erp系统管理员)题目 求解 偶乃一应届毕业生,上星期在网上见到一不错的公司招oracle数据库管理,于是屁颠屁颠跑到那公司,骗过门卫和保安,咨询了搞卫生的阿姨后,见到了人力资源部主管,话都没说上两句,给偶一道题目(erp系统管理员),结果没几个会做的。其实我自己也挺想往erp方向发展,所以打算下个星期再去。 请各位大虾忙忙,提点提点。(我在论坛上查了些,资料,还是有好多不会的。) 1。列出 erp供应商及erp产品的名称,版本? (erp供应商是不是:racle erp在咱国内的用户比如,华菱、湘钢、衡钢、承 钢、济钢等等。名称和版本呢?) 2。名词解释 erp,crm,hr,oa,srm,pdm (我只查到了erp,crm,hr的解释,其他的查不到) 3。用一句话说明 bom,采购计划,生产订单,销售订单,物料清单 (查不到 ) 4。写sql语句。 ‘存货档案’(表一): 存货编码(c),存货名称(c),存货规格(c),存货类别(c) ‘发货单’(表二):存货编码(c),数量(n),单价(n) 用sql写出 A:存货类别为'办公用品',发货金额在1000元以下的所有发货单 B: 按存货名称汇总发货单的发货金额 (此题会做一点点,但是写得不全,还得请大家指导) 5 写出erp系统对'销售发货单',‘销售普通发票’生成的会计分录 (完全摸不着头脑)

111,092

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧