Getting SharePoint objects (spweb, splist, splistitem) from url string
You basically get anything in the object model with one full url:
//here is the site for the url
using (SPSite site = new SPSite("http://basesmcdev2/sites/tester1/tester4/A0805051340564172608.txt"))
{
//here is the web for the url
using (SPWeb web = site.OpenWeb())
{
//here is the file for the url
SPFile file = web.GetFile("http://basesmcdev2/sites/tester1/tester4/A0805051340564172608.txt"); //here is the list for the url
SPList list = file.Item.ListItems.List; //here is the list item for the url
SPListItem item = file.Item;
}
}
Getting SharePoint objects (spweb, splist, splistitem) from url string的更多相关文章
- 详解 SWT 中的 Browser.setUrl(String url, String postData, String[] headers) 的用法
http://hi.baidu.com/matrix286/item/b9e88b28b90707c9ddf69a6e ———————————————————————————————————————— ...
- SharePoint REST API - 确定REST端点URL
博客地址:http://blog.csdn.net/FoxDave SharePoint REST端点URI的结构 在你能够通过REST访问SharePoint资源之前,首先你要做的就是找出对应的 ...
- mongo connections url string 的问题
摘要 driver 连接Mongo DB的url其实很简单,就是几个变量拼接成一个url,和关系型数据库没什么不同.但是因为mongo有单个instance和replicaSet不同的部署策略,还有m ...
- DeprecationWarning: current URL string parser is deprecated解决方法
我最近在使用mongoDB的时候,发现了这个警告语句,纳闷了,按照官方文档的教程去连接数据库还能出错,也是醉了. 后来尝试去阅读相关资料,发现只是需要将{ useNewUrlParser: true ...
- 关于nodejs DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
const mongoose = require('mongoose') mongoose.connect("mongodb://localhost:27017/study", { ...
- Sharepoint学习笔记—习题系列--70-573习题解析 -(Q81-Q84)
Question 81You need to create a Web Part that creates a copy of the out-of-the-box Contribute permis ...
- SharePoint 2013开发入门探索(二)- 列表操作
我们如何用代码对SharePoint列表做些例如增删改查的操作呢?如果您的程序可以部署到服务器上,就可以使用 服务器对象模型,因为服务器对象模型提供的功能最多,限制最少:否则可能要选择客户对象模型等其 ...
- Upgrading or Redeploying SharePoint 2010 Workflows
While creating several State Machine SharePoint 2010 workflows using visual studio for a client I ha ...
- SharePoint开发 - Excel数据导入到SharePoint自定义列表(数据视图方式)
博客地址 http://blog.csdn.net/foxdave 本篇讲解一个有些新颖的SharePoint实例应用,给甲方做过项目的都有过体会,数据太多了,客户有Excel,要求实现批量导入. 效 ...
随机推荐
- Spring 一二事(6) - IOC MVC 简易搭建
<bean id="personAction" class="com.lee.spring008.IOC.DI.MVC.PersonAction"> ...
- .NET执行SQL插入时间的问题
错误描述: 一个项目,源码是BOSS给的,部署到网上了,运行没有问题,可是在本地运行,就会有问题,问题在于往一些表插入记录的时候,本地不管怎么样都插入不了,而网上就可以插入,都是相同的一份代码 解决: ...
- 【Android】10.5 滚动视图(RecyclerView)
分类:C#.Android.VS2015: 创建日期:2016-02-19 一.简介 滚动视图(RecyclerView)的用法与布局控件的用法类似,唯一不同的是,所有布局控件中都可以包含多个组件,而 ...
- Oracle PLSQL Demo - 13.游标的各种属性[Found NotFound ISOpen RowCount CURSOR]
declare r_emp scott.emp%rowtype; cursor cur_emp is select t.* from scott.emp t; begin open cur_emp; ...
- 安卓开发之Toolbar
根据官网的教程,发现实现与预期不一致,查看相关资料自己整理了一下(官网开发文档:https://developer.android.com/training/appbar/setting-up.htm ...
- ubuntu tftp 配置
1:sudo apt-get install tftp tftpd openbsd-inetd特别指出很多文章里用的是netkit-inetd,但是实际下载时发现这个软件是下不到的,特改用openbs ...
- sqlserver 用户名创建 及权限配置
打开SQL Server2008,以windows身份验证模式登陆(其他版本同理) 在"对象资源管理器"中展开"安全性",右击"登录名",在 ...
- mysql root 密码忘记
首次安装mysql后,使用root登录mysql.终端会提示需要输入密码.可是安装的过程并没有提示输入root的密码.怎么办呢?通过修改my.conf配置绕开mysql的授权验证,重置root用户的密 ...
- 如何在 Java 中正确使用 wait, notify 和 notifyAll?
简介 wait,notify,notifyAll,都是属于object对象提供的方法,但在实际工作中怎么使用这几个方法,确是很多程序员清楚,不够明白,在群里问,有人说,哪个线程想wait,就用 ...
- Scala之::的研究
一个非常细节的问题,简单总结一下.::在Scala里有两种含义.一种是List集合的一个方法,用于把一个元素加入到集合的前面:还有一种表示一个非空的List集合,往往应用于模式匹配中.本文原文出处: ...