本文整理汇总了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);
}
}