2011-03-30 64 views
0

我發現本教程,但它在Vb中,缺少太多東西,所以我不確定如何使其工作。我如何在Sharepoint 2010中以編程方式獲取視圖列表

Here is a short example of how to get list views using Client object model in SharePoint 2010 



Dim objmyList As SP.List = g_objCore.Security.Web.Lists.GetByTitle(「**Your List Name*」) 

Dim objmyView As SP.View = objmyList.Views.GetByTitle(「*Your View Name*」) 

Dim objViewFldColl As SP.ViewFieldCollection = objmyView.ViewFields 

g_objCore.Security.ClientContext.Load(objViewFldColl) 

g_objCore.Security.ClientContext.ExecuteQuery() 

Now you can iterate through objViewFldColl to get the Fields in the View 

我不確定如何獲取此客戶端對象模型。我也不知道是什麼列表導入。我得到3個命名空間

using Microsoft.Office.Server.ActivityFeed; 
using Microsoft.SharePoint.Portal.Audience.AdminUI; 
using System.Windows.Documents; 

我想在一個可視化的網頁部分的代碼,使這個落後的像一個選擇。我正在使用C#,而且我實際上有5分鐘的分享點經驗(有些必須跳過101的分享點,並且執行我現在暫時處於某個項目的這一小部分)。

回答

相關問題