public static void checkUrl()
        {
            List <Links> allowedLinks = LinksManager.getAllowedLinks();

            String currentUrl = HttpContext.Current.Request.CurrentExecutionFilePath;

            int allowed = allowedLinks.FindIndex(f => f.getPath() == currentUrl);

            if (allowed < 0)
            {
                HttpContext.Current.Response.Redirect("~/index.aspx");
            }
        }
示例#2
0
    private void getNavLinks()
    {
        List <Links> allowedLinks = LinksManager.getAllowedLinks();

        sendLinksToWrite(allowedLinks);
    }