小编Mat*_*rty的帖子

Sharepoint 2010应用程序页面出现问题

我是Sharepoint的新手,我正在使用2010版本.我正在尝试构建的应用程序页面中遇到以下代码问题:

using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.Office.Server;
using Microsoft.Office.Server.UserProfiles;
using Microsoft.SharePoint.Utilities;

namespace SharePointProject5.Layouts.SharePointProject5
{
    public partial class ApplicationPage1 : LayoutsPageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SPContext context = SPContext.Current;
            StringBuilder output = new StringBuilder();           

            using(SPSite site = context.Site)
            using (SPWeb web = site.AllWebs["BDC_SQL"])
            {
                UserProfileManager upmanager = new UserProfileManager(ServerContext.GetContext(site));
                string ListMgr = "";
                string ADMgr = "";

                bool allowUpdates = web.AllowUnsafeUpdates;
                web.AllowUnsafeUpdates = true;
                web.Update();

                SPListCollection listcollection = web.Lists;
                SPList list …
Run Code Online (Sandbox Code Playgroud)

c# sharepoint-2010

5
推荐指数
1
解决办法
8720
查看次数

标签 统计

c# ×1

sharepoint-2010 ×1