首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

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

2012-03-03 
Session不能再pageload前获取吗?Imports System.DataImports System.NetImports System.Net.MailImports S

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状态设为不可用了
[解决办法]
当然可以啊。。

热点排行