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


C# LinkButton.GetRouteUrl方法代码示例

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


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

示例1: CreatePanelHeading

        void CreatePanelHeading(WC.WebControl container)
        {
            WC.Panel heading = new WC.Panel();

            if (activePanel is MPanel)
            {
                Label panelName = new Label();
                panelName.CssClass = "panelHeading";
                panelName.Text = activePanel.panelName;
                heading.Controls.Add(panelName);
            }
            if (CE.GlobalState == GlobalState.Architect)
            {
                LinkButton editMenuLink = new LinkButton();
                editMenuLink.PostBackUrl = editMenuLink.GetRouteUrl("ArchitectEditMenuRoute", new { projectName = CE.project.Name });
                editMenuLink.Text = "Edit menu structure";
                editMenuLink.CausesValidation = false;
                heading.Controls.Add(editMenuLink);

                LinkButton editPanelsLink = new LinkButton();
                editPanelsLink.PostBackUrl = editPanelsLink.GetRouteUrl("ArchitectEditPanelsRoute", new { projectName = CE.project.Name });
                editPanelsLink.Text = "Edit panels structure";
                editPanelsLink.CausesValidation = false;
                heading.Controls.Add(editPanelsLink);

                if (activePanel is MPanel)
                {

                    if (activePanel.type == PanelTypes.Editable)
                    {
                        LinkButton editEditableLink = new LinkButton();
                        editEditableLink.PostBackUrl = editEditableLink.GetRouteUrl("ArchitectEditEditableRoute",
                            new { projectName = mm.ProjectName, panelid = Page.RouteData.Values["panelId"] });
                        editEditableLink.Text = "Edit panel structure";
                        editEditableLink.CausesValidation = false;
                        heading.Controls.Add(editEditableLink);
                    }
                    else
                    {
                        LinkButton editNavLink = new LinkButton();
                        editNavLink.PostBackUrl = editNavLink.GetRouteUrl("ArchitectEditNavRoute",
                            new { projectName = CE.project.Name, panelid = Page.RouteData.Values["panelId"] });
                        editNavLink.Text = "Edit panel structure";
                        editNavLink.CausesValidation = false;
                        heading.Controls.Add(editNavLink);
                    }
                }

                LinkButton reproposeLink = new LinkButton();
                reproposeLink.CausesValidation = false;
                reproposeLink.Click += Repropose_Click;
                reproposeLink.Text = "Repropose";
                reproposeLink.OnClientClick = "return confirm('Think twice')";
                heading.Controls.Add(reproposeLink);
            }

            heading.CssClass = "panelHeading";
            if (heading.Controls.Count > 0)
            {
                container.Controls.Add(heading);
                WC.Panel clear = new WC.Panel();
                clear.CssClass = "clear";
                container.Controls.Add(clear);
            }
        }
开发者ID:rjankovic,项目名称:webminVS2010,代码行数:65,代码来源:Show.aspx.cs


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