本文整理汇总了C#中UrlBuilder.RemoveQueryString方法的典型用法代码示例。如果您正苦于以下问题:C# UrlBuilder.RemoveQueryString方法的具体用法?C# UrlBuilder.RemoveQueryString怎么用?C# UrlBuilder.RemoveQueryString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UrlBuilder
的用法示例。
在下文中一共展示了UrlBuilder.RemoveQueryString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterListTab
//.........这里部分代码省略.........
Image32By32Left = -352,
ToolTipTitle = LocalizationHelper.GetStringFromCoreResource("cui_ButCreateColumn"),
ToolTipDescription = LocalizationHelper.GetStringFromCoreResource("cui_STT_ButCreateColumn"),
TemplateAlias = "c2",
};
customViewsGroup.Controls.Add(btnCreateColumn);
var btnNavigateUp =
new RibbonButton(
"VP.Sharepoint.CQ.Core.Ribbon.Tabs.List.Groups.CustomViews.Controls.NavigateUp")
{
Sequence = 30,
LabelText = LocalizationHelper.GetStringFromCoreResource("cui_ButNavigateUp"),
Image16By16 = string.Format("/_layouts/{0}/images/formatmap16x16.png", lcid),
Image16By16Top = 0,
Image16By16Left = -56,
Image32By32 = string.Format("/_layouts/{0}/images/formatmap32x32.png", lcid),
Image32By32Top = -64,
Image32By32Left = 0,
ToolTipTitle = LocalizationHelper.GetStringFromCoreResource("cui_ButNavigateUp"),
ToolTipDescription = LocalizationHelper.GetStringFromCoreResource("cui_STT_ButNavigateUp"),
TemplateAlias = "c2",
};
var rootFolder = Page.Request.QueryString["RootFolder"];
if (!string.IsNullOrEmpty(rootFolder))
{
var folder = SPContext.Current.Web.GetFolder(rootFolder);
if (folder.ParentFolder != null && folder.UniqueId != List.RootFolder.UniqueId)
{
var urlBuilder = new UrlBuilder(Page.Request.RawUrl);
urlBuilder.AddQueryString("RootFolder", folder.ParentFolder.ServerRelativeUrl);
urlBuilder.RemoveAllFilterQueryString();
urlBuilder.RemoveQueryString("Source");
btnNavigateUp.Command =
new SPRibbonCommand("VP.Sharepoint.CQ.Core.Ribbon.Tabs.List.Commands.NavigateUp",
string.Format("window.location = '{0}';", urlBuilder));
}
}
customViewsGroup.Controls.Add(btnNavigateUp);
var shareGroup = new RibbonGroup("VP.Sharepoint.CQ.Core.Ribbon.Tabs.List.Groups.Share")
{
Sequence = 50,
Title = LocalizationHelper.GetStringFromCoreResource("cui_GrpShare"),
Image32By32Popup = string.Format("/_layouts/{0}/images/formatmap32x32.png", lcid),
Image32By32PopupLeft = -448,
Image32By32PopupTop = -256,
GroupTemplate = RibbonGroupTemplate.Flexible2
};
shareGroup.MaxSizes.Add(new RibbonMaxSize("Ribbon.List.Scaling.Share.MaxSize")
{Sequence = 40, Group = shareGroup, Size = RibbonSize.LargeLarge});
shareGroup.Scales.Add(new RibbonScale("Ribbon.List.Scaling.Share.MediumMedium")
{Sequence = 90, Group = shareGroup, Size = RibbonSize.MediumMedium});
shareGroup.Scales.Add(new RibbonScale("Ribbon.List.Scaling.Share.Popup")
{Sequence = 170, Group = shareGroup, Size = RibbonSize.Popup});
listTab.Groups.Add(shareGroup);
RegisterRibbonControls(shareGroup);
var handlerStatement = new StringBuilder();
handlerStatement.AppendFormat("window.location = 'mailto:?body={0}';", DataViewUtils.Escape(Page.Request.Url.OriginalString));
var btnEmailLibraryLink =
new RibbonButton(