当前位置: 首页>>代码示例>>C#>>正文


C# UrlBuilder.RemoveAllFilterQueryString方法代码示例

本文整理汇总了C#中UrlBuilder.RemoveAllFilterQueryString方法的典型用法代码示例。如果您正苦于以下问题:C# UrlBuilder.RemoveAllFilterQueryString方法的具体用法?C# UrlBuilder.RemoveAllFilterQueryString怎么用?C# UrlBuilder.RemoveAllFilterQueryString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UrlBuilder的用法示例。


在下文中一共展示了UrlBuilder.RemoveAllFilterQueryString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterListTab


//.........这里部分代码省略.........
                        Image32By32Top = -96,
                        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 =
开发者ID:setsunafjava,项目名称:vpsp,代码行数:67,代码来源:FlatDataView.cs


注:本文中的UrlBuilder.RemoveAllFilterQueryString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。