protected void Page_Load(object sender, EventArgs e)
{
if(IsPostBack)
if (HttpContext.Current.User.Identity.IsAuthenticated)
{
Session["UserName"] = HttpContext.Current.User.Identity.Name;
}
}
<sessionState mode="InProc" cookieless="true" timeout="30" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=localhost;Trusted_Connection=yes;"/>
{
if(IsPostBack)
if (HttpContext.Current.User.Identity.IsAuthenticated)
{
Session["UserName"] = HttpContext.Current.User.Identity.Name;
}
}
<sessionState mode="InProc" cookieless="true" timeout="30" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=localhost;Trusted_Connection=yes;"/>
解决方案 »
- 求网站多语言解决方案代码
- 如何设置前台span值
- 请教c#正则提取,继续麻烦各位。
- 在复合控件中,如何对TextBox的TextChanged事件进行冒泡处理
- DataList,Repeater组合使用问题?
- 第一次使用TreeView,出现问题,求助~~~~~~!!!
- 点radiolist项目弹出新窗口之后,如何把radiolist所在页面的form数据都取到新窗口中?急等。。。
- 救命啊
- 求一SQL语句:如何将字段Field值(字段类型为字符型)中含有8的记录获取到? 必须等于8,而不能将18、80等数据取出来。该字段存储数据格
- 【求助】Asp.Net错误处理(404或其它。。。)
- [C#]高难度挑战!!!我被困好几天了,请大家帮忙看下
- 奇怪的 Gridview 中ItemTemplate的问题!!!!!!!!!!!!!
{------
}
试试看!
做人要厚道!