读书人

Session不能再pageload前获取吗?解决

发布时间: 2012-03-03 15:33:04 作者: rapoo

Session不能再pageload前获取吗?
Imports System.Data
Imports System.Net
Imports System.Net.Mail
Imports System.Net.Mail.MailMessage
Imports System.Net.Mail.SmtpClient
Partial Class ClassesReqN
'提取用户信息
Dim struseridd As String = Session("Userid").ToString()

Private sub Page_Load


提示错误
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.



[解决办法]
可以啊
提示说你的session状态设为不可用了
[解决办法]
当然可以啊。。

读书人网 >asp.net

热点推荐