MsProject技术交流群207637602

07 2013 档案

摘要:using System;using System.Collections.Generic;using System.Text;using Microsoft.SharePoint;using System.Web;namespace MyProject.Features{ public class MyEventReceiver : SPItemEventReceiver { HttpContext currentContext; public MyEventReceiver() { currentContext =... 阅读全文
posted @ 2013-07-19 17:24 鳄鱼的眼泪 阅读(280) 评论(0) 推荐(0)
摘要:protected void CreateDocLib(){SPSite site = SPContext.Current.Site;SPWeb web = site.OpenWeb(); SPListTemplateType templateType = SPListTemplateType.DocumentLibrary;Guid listId = web.Lists.Add("MyDocLibrary", null, templateType);SPList list = web.Lists[listId]; // create Text type new colum 阅读全文
posted @ 2013-07-19 11:36 鳄鱼的眼泪 阅读(280) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { string newPageUrl = ""; SPSecurity.RunWithElevatedPrivileges(delegate()// executing this code with elevated privileges will help whenever we create the publishing pages from a sharepoint portal site for an another portal site.If we create the publishing pa 阅读全文
posted @ 2013-07-08 10:59 鳄鱼的眼泪 阅读(1002) 评论(0) 推荐(0)
摘要:在VS中创建一个applicationPage映射到Layouts文件夹下,然后代码如下:SPList lstTest = web.Lists["Shared Documents"];string newUrl = string.Format("layouts/NewEditForm.aspx", web.ServerRelativeUrl, lstTest.RootFolder.Url);var form = web.GetFile(newUrl);if (form != null && form.Exists){ //string n 阅读全文
posted @ 2013-07-08 01:19 鳄鱼的眼泪 阅读(309) 评论(0) 推荐(0)

专业MSProject,QQ411033149