当前位置: 代码迷 >> ASP.NET >> Session不能再pageload前获取吗?解决方法
  详细解决方案

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

热度:2983   发布时间:2013-02-25 00:00:00.0
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状态设为不可用了
------解决方案--------------------------------------------------------
当然可以啊。。
  相关解决方案