首页 > 其他 > 详细

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

时间:2016-02-23 11:27:06      阅读:212      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!