Administration/Navigation.aspx.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

//===============================================================================================
//
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.
//
//===============================================================================================

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MyWebPagesStarterKit;
using MyWebPagesStarterKit.Controls;
using MyWebPagesStarterKit.Providers;
using System.Xml;
using System.IO;

public partial class Administration_Navigation : PageBaseClass
{
    private SitemapEditor editor = null;
    protected string lang;

    protected void Page_Load(object sender, EventArgs e)
    {
        //define language for the documentation path
        lang = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
        if (!File.Exists(HttpContext.Current.Server.MapPath(string.Format("~/Documentation/" + lang + "/quick_guide.html"))))
        {
            lang = "en";
        }
       
        if (!User.IsInRole(RoleNames.Administrators.ToString()))
            Response.Redirect("Login.aspx");

        Response.Expires = 0;
        Response.ExpiresAbsolute = DateTime.Now.AddMinutes(-1.0);
        Response.CacheControl = "private";
        Response.Cache.SetCacheability(HttpCacheability.NoCache);

        if (!IsPostBack)
        {
            btnDelete.OnClientClick = "if (!confirm('" + Resources.StringsRes.adm_Navigation_PageDeletionWarning + "')) return false;";
            populateList(SiteMap.RootNode, 0);
            if (Request.QueryString["sel"] != null)
            {
                lstPages.SelectedValue = Request.QueryString["sel"];
                showPageDetails(lstPages.SelectedValue);
            }
        }
    }

    protected void valVirtualPath_ServerValidate(object source, ServerValidateEventArgs args)
后面还有 200 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。