public static void CreateSubItem(NavMenu menu, TreeNode mainNode, Page page) { foreach (NavMenu submenu in menu.SubMenus) { var subNode = new TreeNode(submenu.Id); subNode.Text = submenu.Name; SetIcon(submenu.Icon, submenu.IsCategory, subNode); if (submenu.IsSystem) { subNode.Href = page.ResolveUrl(submenu.NavUrl); } else { string url = UrlUtil.CombineWebUrl(submenu.SystemUrl, submenu.NavUrl); url = SSOProvider.AddSSFTokenToUrl(url, SSOProvider.GetSSOKeyFromPage(page)); subNode.Href = url; } subNode.CustomAttributes.Add(new ConfigItem("isCategory", submenu.IsCategory.ToString(), ParameterMode.Value)); subNode.CustomAttributes.Add(new ConfigItem("navPath", submenu.getPath(), ParameterMode.Value)); mainNode.Nodes.Add(subNode); CreateSubItem(submenu, subNode, page); } }
public static void RedirectToBSFLoginUrl(Page page) { string redirectDefaultUrl = UrlUtil.CombineWebUrl(SSOConfig.BSFWebRoot, AddSSFTokenToUrl( page.ResolveUrl(FormsAuthentication.LoginUrl), GetSSOKeyFromPage(page))); page.Response.Redirect(redirectDefaultUrl); }