博客园  :: 首页  :: 新随笔  :: 联系 :: 管理

2011年4月29日

摘要: using(SPWebospWeb=SPContext.Current.Web){//...Logic}Pageerror “Trying to use an SPWeb object that has been closed or disposed and is no longer valid.”Modified the code as shown below:using(SPSite spSite=new SPSite(SPContext.Current.Web.Url)){using (SPWeb spWeb = spSite.OpenWeb()){//...Logic}}MSDN cl 阅读全文

posted @ 2011-04-29 15:06 木头人Ricky 阅读(289) 评论(0) 推荐(0) 编辑