我是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)