如何在全球范围内声明它 [英] How to declare it Globally
本文介绍了如何在全球范围内声明它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
clsUserDetails objUserDetails =(clsUserDetails)Session [UserDetails];
如何在类中声明全局
当我声明它显示errer
错误4非静态字段,方法或属性'System.Web.UI.Page.Session.get需要对象引用
clsUserDetails objUserDetails = (clsUserDetails)Session["UserDetails"];
how to declare it Globally in a classs
when i declare it shows errer
Error 4 An object reference is required for the non-static field, method, or property 'System.Web.UI.Page.Session.get
推荐答案
在session_start方法中的global.asax页面内声明会话。
检查链接< br $> b $ b
会话和应用程序在Asp-Net / [ ^ ]
http://forums.asp.net/t/1287741.aspx/1 [ ^ ]
http://forums.asp.net/t/1779464.aspx/1 [ ^ ]
Declare the session inside global.asax page inside session_start method.
check the links also
session-and-application-in-Asp-Net/[^]
http://forums.asp.net/t/1287741.aspx/1[^]
http://forums.asp.net/t/1779464.aspx/1[^]
>
这篇关于如何在全球范围内声明它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文