我要求删除左手目前的航道中使用“SignPoint 标号”的一些缺省(即人与群体、地点)。 谁能就如何实现这一目标向我提供任何指导?
谢意
我要求删除左手目前的航道中使用“SignPoint 标号”的一些缺省(即人与群体、地点)。 谁能就如何实现这一目标向我提供任何指导?
谢意
你的法典将探讨这样的问题:
using (SPSite oSite= new SPSite("http://someurl/")){
using (SPWeb oWeb = oSite.OpenWeb()){
foreach (SPNavigationNode oNode in oWeb.Navigation.QuickLaunch)
{
if (oNode.Title == "Sites") {
oNode.Delete();
}
}
}
}
虽然知道,没有建议按标题确定该项目,但是如果网络局不是英文,则会有所不同。 因此,最好能找到其身份证明。 See IDs here - http://msdn.microsoft.com/en-us/library/d587301(office.11).aspx
基于神经学家的回答:
public static void DeleteNavigationNodes(string p_sSiteUrl)
{
try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(p_sSiteUrl))
{
using (SPWeb web = site.OpenWeb())
{
PublishingWeb pubWeb = null;
if (PublishingWeb.IsPublishingWeb(web))
{
pubWeb = PublishingWeb.GetPublishingWeb(web);
foreach (SPNavigationNode node in pubWeb.CurrentNavigationNodes)
{
if ((node.Id != 1003 ) && (node.Id != 1004 ))
{
node.Delete();
}
}
pubWeb.Update();
}
}
}
});
}
catch (Exception ex)
{
// Log error
}
}
该条也是有益的:
Lately I ve been looking for a good networking API i could possibly use and/or reference some of the code within, but i have mere luck searching for some on Google/Bing. Hopefully somebody here has ...
I m fairly new to ASP.NET. And I was wondering how I could go about getting xml from a site (Kuler s API in this case), and then post the result using AJAX? So what I want here, is to be able to do a ...
I ve just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites). I m thinking about the API for ...
I am trying to research error handling paradigms in web service client apps. I haven t found any good results on Google - perhaps I m not searching using the right terminology. I will describe my ...
I need to create a diagram to document a RESTFul API that build, which UML diagram should I use? Thanks in advance,
Let s say I have a model foo, and my model has a publish! method that changes a few properties on that model and potentially a few others too. Now, the Rails way suggests that I expose my model over ...
我是否可以使用某些软件来建立简便的航天国家服务器,最好是在 Java? 所有我都希望我的航天国家服务机在任何要求中都用同样的IP地址来回答。
In this picture,there are 3 main steps:SetExpressCheckout,GetExpressCheckoutDetails and DoExpressCheckoutDetails,I m now sure SetExpressCheckout is to be called by myself,what about ...