• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# HeaderAction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中HeaderAction的典型用法代码示例。如果您正苦于以下问题:C# HeaderAction类的具体用法?C# HeaderAction怎么用?C# HeaderAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HeaderAction类属于命名空间,在下文中一共展示了HeaderAction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Page_Load

    /// <summary>
    /// Handles the Load event of the Page control.
    /// </summary>
    protected void Page_Load(object sender, EventArgs e)
    {
        widgetId = QueryHelper.GetInteger("widgetid", 0);

        Title = "Widget part documentation";

        // Resource string
        btnOk.Text = GetString("General.Ok");

        WidgetInfo wi = WidgetInfoProvider.GetWidgetInfo(widgetId);

        // set Documentation header - "View documentation" + "Generate Documentation"
        if (wi != null)
        {

            HeaderAction action = new HeaderAction();
            action.Text = GetString("webparteditdocumentation.view");
            action.RedirectUrl = "~/CMSModules/Widgets/Dialogs/WidgetDocumentation.aspx?widgetid=" + wi.WidgetID;
            action.Target = "_blank";
            CurrentMaster.HeaderActions.AddAction(action);
        }

        // HTML editor settings
        htmlText.AutoDetectLanguage = false;
        htmlText.DefaultLanguage = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
        htmlText.EditorAreaCSS = "";
        htmlText.ToolbarSet = "SimpleEdit";

        // Load data
        if (!RequestHelper.IsPostBack() && (wi != null))
        {
            htmlText.ResolvedValue = wi.WidgetDocumentation;
        }
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:37,代码来源:Widget_Edit_Documentation.aspx.cs


示例2: InitMaster

    /// <summary>
    /// Initializes master page and header actions.
    /// </summary>
    private void InitMaster()
    {
        // Init filter for the first time according to user permissions
        if (!RequestHelper.IsPostBack())
        {
            if (AuthorizedForGlobalPolls && AuthorizedForSitePolls)
            {
                fltSite.SiteID = QueryHelper.GetInteger("siteid", SiteContext.CurrentSiteID);
            }
            else if (AuthorizedForSitePolls)
            {
                // User is authorized for site polls => select site polls
                fltSite.SiteID = SiteContext.CurrentSiteID;
            }
            else
            {
                // User is authorized for global polls => select global polls only
                fltSite.SiteID = UniSelector.US_GLOBAL_RECORD;
            }
        }

        HeaderAction action = new HeaderAction();
        action.Text = GetString("Polls_List.NewItemCaption");
        action.RedirectUrl = ResolveUrl("Polls_New.aspx?siteid=" + fltSite.SiteID);
        hdrActions.AddAction(action);

        // Set the page title
        PageTitle.TitleText = GetString("Polls_List.HeaderCaption");
        CurrentMaster.DisplaySiteSelectorPanel = AuthorizedForSitePolls && AuthorizedForGlobalPolls;
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:33,代码来源:Polls_List.aspx.cs


示例3: InitHeaderActions

    /// <summary>
    /// Initializes header actions.
    /// </summary>
    private void InitHeaderActions()
    {
        if (MembershipContext.AuthenticatedUser.IsAuthorizedPerUIElement("CMS.MVTest", "New"))
        {
            string url = UIContextHelper.GetElementUrl("CMS.MVTest", "New", EditInDialog);

            // Get the alias path of the current node
            if (Node != null)
            {
                // Set NodeID in order to check the access to the document
                listElem.NodeID = Node.NodeID;
                listElem.AliasPath = Node.NodeAliasPath;

                url = URLHelper.AddParameterToUrl(url, "NodeID", Node.NodeID.ToString());
                url = URLHelper.AddParameterToUrl(url, "AliasPath", Node.NodeAliasPath);
            }

            // Set header action
            var action = new HeaderAction
            {
                ResourceName = "CMS.MVTest",
                Permission = "Manage",
                Text = GetString("mvtest.new"),
                RedirectUrl = ResolveUrl(url),
                OpenInDialog = EditInDialog
            };

            CurrentMaster.HeaderActions.AddAction(action);
        }
    }
开发者ID:arvind-web-developer,项目名称:csharp-projects-Jemena-Kentico-CMS,代码行数:33,代码来源:List.aspx.cs


示例4: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        int projectId = QueryHelper.GetInteger("projectid", 0);

        ProjectInfo pi = ProjectInfoProvider.GetProjectInfo(projectId);
        if (pi != null)
        {
            if (pi.ProjectSiteID != SiteContext.CurrentSiteID)
            {
                RedirectToInformation(GetString("general.notassigned"));
            }
        }

        if (projectId > 0)
        {
            // Display project tasks
            listElem.ProjectID = projectId;
            listElem.OrderByType = ProjectTaskOrderByEnum.ProjectOrder;
            listElem.OrderBy = "TaskPriorityOrder ASC, ProjectTaskDeadline DESC";
        }
        else
        {
            // Display all task (project + ad-hoc tasks)
            listElem.Grid.GridName = "~/CMSModules/ProjectManagement/Controls/UI/ProjectTask/ListAll.xml";
            listElem.OrderBy = "ProjectTaskDisplayName";
            listElem.SiteName = SiteContext.CurrentSiteName;
        }

        HeaderAction action = new HeaderAction();
        action.Text = (projectId > 0) ? GetString("pm.projecttask.new") : GetString("pm.projecttask.newpersonal");
        action.RedirectUrl = ResolveUrl("Edit.aspx" + ((projectId > 0) ? ("?projectid=" + projectId) : ""));
        CurrentMaster.HeaderActions.AddAction(action);
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:33,代码来源:List.aspx.cs


示例5: OnPreRender

    protected override void OnPreRender(EventArgs e)
    {
        if (CurrentWorkflow != null)
        {
            // Only basic workflow without auto-publish can be converted
            if (WorkflowInfoProvider.IsAdvancedWorkflowAllowed() && CurrentWorkflow.IsBasic)
            {
                HeaderAction convert = new HeaderAction()
                {
                    Text = GetString("workflow.convert"),
                    ImageUrl = GetImageUrl("Design/Controls/UniGrid/Actions/convert.png"),
                    OnClientClick = "return confirm(" + ScriptHelper.GetString(GetString("workflow.confirmconversion"), true) + ");",
                    EventName = CONVERT_ACTION
                };

                if (editElem.CurrentWorkflow.WorkflowAutoPublishChanges)
                {
                    convert.ImageUrl = GetImageUrl("Design/Controls/UniGrid/Actions/convertdisabled.png");
                    convert.Tooltip = GetString("workflow.conversionerror.versioningwithoutworkflow");
                    convert.Enabled = false;
                }
                CurrentMaster.HeaderActions.AddAction(convert);
            }
        }
        base.OnPreRender(e);
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:26,代码来源:Workflow_General.aspx.cs


示例6: InitHeaderActions

    /// <summary>
    /// Initializes header actions.
    /// </summary>
    private void InitHeaderActions()
    {
        if (MembershipContext.AuthenticatedUser.IsAuthorizedPerUIElement("CMS.ABTest", "New"))
        {
            string url = UIContextHelper.GetElementUrl("CMS.ABTest", "New", EditInDialog);

            // Get the alias path of the current node, if in content
            if (Node != null)
            {
                listElem.NodeID = Node.NodeID;
                listElem.ShowOriginalPageColumn = false;
                string aliasPath = Node.NodeAliasPath;
                listElem.AliasPath = aliasPath;

                url = URLHelper.AddParameterToUrl(url, "NodeID", Node.NodeID.ToString());
                url = URLHelper.AddParameterToUrl(url, "AliasPath", aliasPath);
            }

            url = ResolveUrl(url);

            // Set header action
            var action = new HeaderAction
            {
                ResourceName = "CMS.ABTest",
                Permission = "Manage",
                Text = GetString("abtesting.abtest.new"),
                RedirectUrl = url,
                OpenInDialog = EditInDialog
            };

            CurrentMaster.HeaderActions.AddAction(action);
        }
    }
开发者ID:arvind-web-developer,项目名称:csharp-projects-Jemena-Kentico-CMS,代码行数:36,代码来源:List.aspx.cs


示例7: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        int projectId = QueryHelper.GetInteger("projectid", 0);
        groupId = QueryHelper.GetInteger("groupid", 0);

        if (projectId > 0)
        {
            // Display project tasks
            listElem.ProjectID = projectId;
            listElem.OrderByType = ProjectTaskOrderByEnum.ProjectOrder;
        }
        else
        {
            // Display all task (project + ad-hoc tasks)
            listElem.Grid.GridName = URLHelper.ResolveUrl("~/CMSModules/ProjectManagement/Controls/UI/ProjectTask/ListAll.xml");
            listElem.OrderByType = ProjectTaskOrderByEnum.ProjectOrder;
            listElem.OrderBy = "ProjectTaskDisplayName";
        }

        // Set OnCheckPermissions event handler
        listElem.OnCheckPermissionsExtended += new CMSAdminControl.CheckPermissionsExtendedEventHandler(listElem_OnCheckPermissionsExtended);

        listElem.CommunityGroupID = groupId;

        HeaderAction action = new HeaderAction();
        action.Text = GetString("pm.projecttask.new");
        action.RedirectUrl = ResolveUrl("~/CMSModules/Groups/Tools/ProjectManagement/ProjectTask/Edit.aspx?projectid=" + projectId + "&groupid=" + groupId);
        CurrentMaster.HeaderActions.AddAction(action);
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:29,代码来源:List.aspx.cs


示例8: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Get poll id from querystring
        pollId = QueryHelper.GetInteger("pollId", 0);
        pi = PollInfoProvider.GetPollInfo(pollId);
        EditedObject = pi;

        // Check global and site read permmision
        CheckPollsReadPermission(pi.PollSiteID);

        if (CheckPollsModifyPermission(pi.PollSiteID, false))
        {
            HeaderAction newItem = new HeaderAction();
            newItem.Text = GetString("Polls_Answer_List.NewItemCaption");
            newItem.RedirectUrl = ResolveUrl("Polls_Answer_Edit.aspx?pollId=" + pollId);
            CurrentMaster.HeaderActions.AddAction(newItem);

            HeaderAction reset = new HeaderAction();
            reset.Text = GetString("Polls_Answer_List.ResetButton");
            reset.OnClientClick = "return confirm(" + ScriptHelper.GetString(GetString("Polls_Answer_List.ResetConfirmation")) + ");";
            reset.CommandName = "btnReset_Click";
            CurrentMaster.HeaderActions.AddAction(reset);
            CurrentMaster.HeaderActions.ActionPerformed += HeaderActions_ActionPerformed;

            AnswerList.AllowEdit = true;
        }

        AnswerList.OnEdit += new EventHandler(AnswerList_OnEdit);
        AnswerList.PollId = pollId;
        AnswerList.IsLiveSite = false;
        AnswerList.AllowEdit = CheckPollsModifyPermission(pi.PollSiteID, false);
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:32,代码来源:Polls_Answer_List.aspx.cs


示例9: Page_Load

    /// <summary>
    /// Handles the Load event of the Page control.
    /// </summary>
    protected void Page_Load(object sender, EventArgs e)
    {
        // Check permissions
        isAuthorised = (CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.Design", "Design"));

        // Setup device layouts grid
        deviceLayoutsGrid.WhereCondition = "ProfileID IN (SELECT ProfileID FROM CMS_TemplateDeviceLayout WHERE PageTemplateID = " + PageTemplateID + ")";
        deviceLayoutsGrid.OnAction += new OnActionEventHandler(deviceLayoutsGrid_OnAction);

        // "Create device layout" button
        string dialogUrl = URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/PageLayouts/PageLayout_CustomDeviceLayout.aspx?dialog=1&templateid=" + PageTemplateID);

        if (isAuthorised)
        {
            // Create header button
            createDeviceLayout = new HeaderAction()
            {
                ControlType = HeaderActionTypeEnum.LinkButton,
                Text = GetString("devicelayout.create"),
                Tooltip = GetString("devicelayout.create.tooltip"),
                OnClientClick = "modalDialog('" + dialogUrl + "', 'createCustomDeviceLayout', 500, 480); return false;",
                ImageUrl = GetImageUrl("Objects/CMS_DeviceProfile/add.png"),
                SmallImageUrl = GetImageUrl("Objects/CMS_DeviceProfile/add.png")
            };

            AddHeaderAction(createDeviceLayout);
        }

        string script = @"
        function GetEditDeviceUrl(deviceProfileId) {
        return '" + URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/PageTemplates/DeviceLayout_Frameset.aspx") + "?deviceprofileid=' + deviceProfileId + '&templateid=" + PageTemplateID + "&aliaspath=" + aliasPath + @"';
        }";
        ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "editScript", script, true);
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:37,代码来源:PageTemplate_DeviceLayouts.aspx.cs


示例10: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        webpartId = QueryHelper.GetInteger("webpartid", 0);

        Title = "Web part documentation";

        // Resource string
        btnOk.Text = GetString("General.Ok");

        WebPartInfo wpi = WebPartInfoProvider.GetWebPartInfo(webpartId);
        EditedObject = wpi;
        if (wpi != null)
        {
            HeaderAction action = new HeaderAction();
            action.Text = GetString("webparteditdocumentation.view");
            action.RedirectUrl = "~/CMSModules/PortalEngine/UI/WebParts/WebPartDocumentationPage.aspx?webpartid=" + wpi.WebPartName;
            action.Target = "_blank";
            CurrentMaster.HeaderActions.AddAction(action);
        }

        // HTML editor settings
        htmlText.AutoDetectLanguage = false;
        htmlText.DefaultLanguage = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
        htmlText.EditorAreaCSS = "";
        htmlText.ToolbarSet = "SimpleEdit";

        // Load data
        if (!RequestHelper.IsPostBack() && (wpi != null))
        {
            htmlText.ResolvedValue = wpi.WebPartDocumentation;
        }
    }
开发者ID:arvind-web-developer,项目名称:csharp-projects-Jemena-Kentico-CMS,代码行数:32,代码来源:WebPart_Edit_Documentation.aspx.cs


示例11: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Get poll id from querystring
        pollId = QueryHelper.GetInteger("pollId", 0);
        groupId = QueryHelper.GetInteger("groupId", 0);

        if (CheckGroupPermissions(groupId, CMSAdminControl.PERMISSION_MANAGE, false))
        {
            HeaderAction newItem = new HeaderAction();
            newItem.Text = GetString("Polls_Answer_List.NewItemCaption");
            newItem.RedirectUrl = ResolveUrl("Polls_Edit_Answer_Edit.aspx?pollId=" + pollId.ToString() + "&groupId=" + groupId);
            CurrentMaster.HeaderActions.AddAction(newItem);

            HeaderAction reset = new HeaderAction();
            reset.Text = GetString("Polls_Answer_List.ResetButton");
            reset.OnClientClick = "return confirm(" + ScriptHelper.GetString(GetString("Polls_Answer_List.ResetConfirmation")) + ");";
            reset.CommandName = "btnReset_Click";
            CurrentMaster.HeaderActions.AddAction(reset);

            CurrentMaster.HeaderActions.ActionPerformed += new CommandEventHandler(HeaderActions_ActionPerformed);

            AnswerList.AllowEdit = true;
        }

        AnswerList.OnEdit += new EventHandler(AnswerList_OnEdit);
        AnswerList.OnCheckPermissions += new CMSAdminControl.CheckPermissionsEventHandler(AnswerList_OnCheckPermissions);
        AnswerList.PollId = pollId;
        AnswerList.GroupId = groupId;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:29,代码来源:Polls_Edit_Answer_List.aspx.cs


示例12: InitializeMasterPage

 /// <summary>
 /// Initializes the master page elements.
 /// </summary>
 private void InitializeMasterPage()
 {
     HeaderAction action = new HeaderAction();
     action.Text = GetString("board.subscriptions.newitem");
     action.RedirectUrl = "~/CMSModules/Groups/Tools/MessageBoards/Boards/Board_Edit_Subscription_Edit.aspx?boardid=" + boardId.ToString() + "&groupid=" + groupId;
     CurrentMaster.HeaderActions.AddAction(action);
 }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:10,代码来源:Board_Edit_Subscriptions.aspx.cs


示例13: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        userId = QueryHelper.GetInteger("userId", 0);
        currentUser = MembershipContext.AuthenticatedUser;
        if (userId <= 0 && currentUser != null)
        {
            userId = currentUser.UserID;
        }

        // Check 'read' permissions
        if (!currentUser.IsAuthorizedPerResource("CMS.Friends", "Read") && (currentUser.UserID != userId))
        {
            RedirectToAccessDenied("CMS.Friends", "Read");
        }

        // Check 'manage' permission
        bool friendsManagePermission = currentUser.IsAuthorizedPerResource("CMS.Friends", "Manage") || (currentUser.UserID == userId);

        // Check license
        if (DataHelper.GetNotEmpty(RequestContext.CurrentDomain, string.Empty) != string.Empty)
        {
            LicenseHelper.CheckFeatureAndRedirect(RequestContext.CurrentDomain, FeatureEnum.Friends);
        }

        // Check that only global administrator can edit global administrator's accounts
        if (userId > 0)
        {
            UserInfo ui = UserInfoProvider.GetUserInfo(userId);
            EditedObject = ui;

            if (!CheckGlobalAdminEdit(ui))
            {
                plcTable.Visible = false;
                lblError.Text = GetString("Administration-User_List.ErrorGlobalAdmin");
                lblError.Visible = true;
            }
            else
            {
                ScriptHelper.RegisterDialogScript(this);
                FriendsList.UserID = userId;
                FriendsList.OnCheckPermissions += CheckPermissions;
                FriendsList.ZeroRowsText = GetString("friends.nouserfriends");

                // Request friend link
                string script =
                    "function displayRequest(){ \n" +
                    "modalDialog('" + AuthenticationHelper.ResolveDialogUrl("~/CMSModules/Friends/Dialogs/Friends_Request.aspx") + "?userid=" + userId + "&siteid=" + SiteID + "', 'rejectDialog', 810, 460);}";

                ScriptHelper.RegisterStartupScript(this, GetType(), "displayModalRequest", ScriptHelper.GetScript(script));

                HeaderAction action = new HeaderAction();
                action.Text = GetString("Friends_List.NewItemCaption");
                action.OnClientClick = "displayRequest();";
                action.RedirectUrl = null;
                action.Enabled = friendsManagePermission;
                CurrentMaster.HeaderActions.AddAction(action);
            }
        }
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:59,代码来源:User_Edit_Friends_Approved.aspx.cs


示例14: InitializeMasterPage

 /// <summary>
 /// Initializes the master page elements.
 /// </summary>
 private void InitializeMasterPage()
 {
     // Setup master page action element
     HeaderAction action = new HeaderAction();
     action.Text = GetString("board.subscriptions.newitem");
     action.RedirectUrl = ResolveUrl("~/CMSModules/MessageBoards/Tools/Boards/Board_Edit_Subscription_Edit.aspx?boardid=" + mBoardId.ToString() + "&changemaster=" + changeMaster);
     CurrentMaster.HeaderActions.AddAction(action);
 }
开发者ID:arvind-web-developer,项目名称:csharp-projects-Jemena-Kentico-CMS,代码行数:11,代码来源:Board_Edit_Subscriptions.aspx.cs


示例15: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Get AnswerID and PollID from querystring
        int pollId = QueryHelper.GetInteger("pollid", 0);

        string currentPollAnswer = GetString("Polls_Answer_Edit.NewItemCaption");

        int answerId = QueryHelper.GetInteger("answerId", 0);
        if (QueryHelper.GetInteger("saved", 0) == 1)
        {
            AnswerEdit.Saved = true;
        }
        AnswerEdit.ItemID = answerId;
        AnswerEdit.PollId = pollId;

        if (answerId > 0)
        {
            // Modifying existing answer
            CurrentMaster.Title.HelpTopicName = "answer_edit";
            PollAnswerInfo pollAnswerObj = PollAnswerInfoProvider.GetPollAnswerInfo(answerId);
            EditedObject = pollAnswerObj;
            if (pollAnswerObj != null)
            {
                currentPollAnswer = GetString("Polls_Answer_Edit.AnswerLabel") + " " + pollAnswerObj.AnswerOrder.ToString();
                pollId = pollAnswerObj.AnswerPollID;
            }
        }
        else
        {
            // Creating new answer - check if parent object exists
            EditedObject = PollInfoProvider.GetPollInfo(pollId);
            CurrentMaster.Title.HelpTopicName = "new_answer";
        }

        // Initializes page title control
        string[,] breadcrumbs = new string[2,3];
        breadcrumbs[0, 0] = GetString("Polls_Answer_Edit.ItemListLink");
        breadcrumbs[0, 1] = "~/CMSModules/Polls/Tools/Polls_Answer_List.aspx?pollId=" + pollId;
        breadcrumbs[0, 2] = "";
        breadcrumbs[1, 0] = currentPollAnswer;
        breadcrumbs[1, 1] = "";
        breadcrumbs[1, 2] = "";
        CurrentMaster.Title.Breadcrumbs = breadcrumbs;

        HeaderAction add = new HeaderAction()
        {
            ControlType = HeaderActionTypeEnum.Hyperlink,
            Text = GetString("Polls_Answer_List.NewItemCaption"),
            RedirectUrl = ResolveUrl("Polls_Answer_Edit.aspx?pollId=" + pollId.ToString()),
            ImageUrl = GetImageUrl("CMSModules/CMS_Polls/addanswer.png")
        };

        CurrentMaster.HeaderActions.AddAction(add);

        AnswerEdit.OnSaved += new EventHandler(AnswerEdit_OnSaved);
        AnswerEdit.IsLiveSite = false;
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:57,代码来源:Polls_Answer_Edit.aspx.cs


示例16: InitializeMasterPage

 /// <summary>
 /// Initializes Master Page.
 /// </summary>
 protected void InitializeMasterPage(string currentForumPost)
 {
     Title = "Forum post listing";
     PageTitle.TitleText = GetString("Forums.Listing.Title");
     if (postInfo != null)
     {
         HeaderAction action = new HeaderAction();
         action.Text = GetString("Forums.ParentPost");
         action.OnClientClick = "SelectPost(" + postInfo.PostParentID + ", " + postInfo.PostForumID + ");";
         action.RedirectUrl = null;
         CurrentMaster.HeaderActions.AddAction(action);
     }
 }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:16,代码来源:ForumPost_Listing.aspx.cs


示例17: InitializeMasterPage

    /// <summary>
    /// Initializes Master Page.
    /// </summary>
    protected void InitializeMasterPage(int forumId)
    {
        Title = "Forums - Subscriptions List";

        HeaderAction action = new HeaderAction();
        action.Text = GetString("ForumSubscription_List.NewItemCaption");

        if (forumId > 0)
        {
            action.RedirectUrl = ResolveUrl("ForumSubscription_Edit.aspx?forumid=" + forumId);
        }

        CurrentMaster.HeaderActions.AddAction(action);
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:17,代码来源:ForumSubscription_List.aspx.cs


示例18: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        CurrentMaster.Page.Title = GetString("dialogs.youtube.inserttitle");
        PageTitle.TitleText = GetString("dialogs.youtube.inserttitle");
        CurrentMaster.Body.Attributes.Add("onbeforeunload", "$cmsj('.YouTubePreviewBox').remove();");

        HeaderAction action = new HeaderAction
        {
            Text = GetString("dialogs.youtube.goto"),
            Target = "_blank",
            RedirectUrl = "http://www.youtube.com"
        };

        CurrentMaster.HeaderActions.AddAction(action);
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:15,代码来源:Content.aspx.cs


示例19: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        messageList.IsLiveSite = false;
        messageList.BoardID = mBoardId;
        messageList.GroupID = mGroupId;
        messageList.OnAction += messageList_OnAction;

        if (mBoardId > 0)
        {
            HeaderAction action = new HeaderAction();
            action.Text = GetString("Board.MessageList.NewMessage");
            action.OnClientClick = "modalDialog('" + AuthenticationHelper.ResolveDialogUrl("~/CMSModules/MessageBoards/Tools/Messages/Message_Edit.aspx") + "?boardId=" + mBoardId + "&changemaster=" + QueryHelper.GetBoolean("changemaster", false) + "', 'MessageEdit', 800, 535); return false;";
            CurrentMaster.HeaderActions.AddAction(action);
        }
    }
开发者ID:arvind-web-developer,项目名称:csharp-projects-Jemena-Kentico-CMS,代码行数:15,代码来源:Message_List.aspx.cs


示例20: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        messageList.BoardID = mBoardId;
        messageList.GroupID = mGroupId;
        messageList.EditPageUrl = "~/CMSModules/Groups/Tools/MessageBoards/Messages/Message_Edit.aspx";
        messageList.OnCheckPermissions += new CMSAdminControl.CheckPermissionsEventHandler(messageList_OnCheckPermissions);
        messageList.OnAction += new CommandEventHandler(messageList_OnAction);

        if (mBoardId > 0)
        {
            HeaderAction action = new HeaderAction();
            action.Text = GetString("Board.MessageList.NewMessage");
            action.OnClientClick = "modalDialog('" + ResolveUrl("~/CMSModules/Groups/Tools/MessageBoards/Messages/Message_Edit.aspx") + "?boardId=" + mBoardId + "', 'MessageEdit', 500, 400); return false;";
            CurrentMaster.HeaderActions.AddAction(action);
        }
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:16,代码来源:Message_List.aspx.cs



注:本文中的HeaderAction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# HeaderHandler类代码示例发布时间:2022-05-24
下一篇:
C# Header类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap