簡體   English   中英

如何在SharePoint 2007和2010中以編程方式直接轉到Web部件的“編輯”視圖?

[英]How can I directly go to the Edit view of a webpart programmatically in SharePoint 2007 and 2010?

我想提供有關Webpart內容的鏈接。 單擊鏈接后,我想切換到編輯視圖 (用戶可以在其中設置Webpart的屬性) 參見下圖。 如何在SharePoint 2007和2010中以編程方式直接轉到以下視圖。

在此處輸入圖片說明

是的,找到了答案。

    <asp:LinkButton ID="ButtonEdit" style="padding-right:5px;" runat="server"
                  Font-Names="Arial" Font-Size="12px" Font-Underline="True"  
                  ForeColor="#003399">Edit</asp:LinkButton>

C#代碼

ButtonEdit.Attributes.Add("onclick", "javascript:MSOTlPn_ShowToolPane2Wrapper('Edit', this,'" + Parent.ID + "');");

我從這篇文章中獲得了幫助

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM