Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        menuElem.OnGetClientValidationScript += menuElem_OnGetClientValidationScript;

        // Register script files
        ScriptHelper.RegisterLoader(this);
        ScriptHelper.RegisterEditScript(Page, false);

        txtPageName.MaxLength = TreePathUtils.GetMaxNameLength(DocumentManager.NewNodeClassName);

        if (DocumentManager.ParentNode != null)
        {
            selTemplate.DocumentID   = DocumentManager.ParentNode.DocumentID;
            selTemplate.ParentNodeID = DocumentManager.ParentNodeID;
        }

        // Hide error label
        lblError.Style.Add("display", "none");

        // Set default focus on page name field
        if (!RequestHelper.IsPostBack())
        {
            txtPageName.Focus();
        }
    }