码迷,mamicode.com
首页 > 其他好文 > 详细

一些工作中的笔记(持续更新)

时间:2016-02-23 11:29:06      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:

因为数据库正在使用,所以无法获得对数据库的独占访问权---还原或删除数据库的解决方法:

ALTER DATABASE [datebase] SET OFFLINE WITH ROLLBACK IMMEDIATE

ALTER  database  [ datebase]  set   online  

 

objiect 转化为 model

mh_reguserInfoModel regUserInfo = (mh_reguserInfoModel)HttpContext.Current.Session["wcm_web_shangHaiMhRegLoginInfo"];

session转化

 ReguserLoginBLL.userDic[regUserInfo.Id] = HttpContext.Current.Session.SessionID;

 ReguserLoginBLL.sessionDic[HttpContext.Current.Session.SessionID] = regUserInfo.Id

 

      IndexOf用法

int nPosEnd = sContent.IndexOf(sTemp)

sContent<title>sdfg</title> 

sTemp </title> 

sContent.IndexOf(sTemp) <title>sdfg

nPosEnd 11

*1.Indexof(*2)取得是*1里面除了*2的字符的个数

 

#region
///清空客户端页面缓存
/// 清空客户端页面缓存 ///
public static void ClearClientPageCache()
{
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.Expires = 0;
HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
HttpContext.Current.Response.AddHeader("pragma", "no-cache"); HttpContext.Current.Response.AddHeader("cache-control", "private");
HttpContext.Current.Response.CacheControl = "no-cache";
}
#endregion

 

一些工作中的笔记(持续更新)

标签:

原文地址:http://www.cnblogs.com/ly133333333333333/p/5209011.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!