我正在使用 DNN 7.00.04。
我开发了一个自定义模块,当我以超级用户身份登录并在页面级别进入编辑模式时,某些图标不会显示。
以下屏幕截图显示,Exam Tracker 模块仅显示一个图标。
如何确保自定义模块显示缺少的图标?
更新:我发现当我在自定义模块视图用户控件的代码隐藏中注释一些代码时,会显示第三个图标。但我不知道为什么 Page_Init 事件中的代码导致第三个图标(左起)不出现?此视图控件的代码如下。
Public Class viewExamTracker
Inherits DotNetNuke.Entities.Modules.PortalModuleBase 'System.Web.UI.UserControl
Protected Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
Dim x As Boolean = Me.IsEditable
'******** CODE BELOW NEEDED TO BE COMMENTED FOR THIRD ICON to show up******
Dim action As DotNetNuke.Entities.Modules.Actions.ModuleAction = New DotNetNuke.Entities.Modules.Actions.ModuleAction(GetNextActionID)
action.Title = "Add New Exam"
action.CommandName = ""
action.Url = EditUrl()
action.Secure = SecurityAccessLevel.Edit
action.Visible = True
MyBase.Actions.Add(action)**
'MyBase.Actions.Add(GetNextActionID, "Add New Exam", "", "", "", URL:=EditUrl(), secure:=SecurityAccessLevel.Edit, Visible:=True)
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Put user code to initialize the page here
Dim objExamTracker As New ExamTrackerController
Dim list As ArrayList
If Not Page.IsPostBack Then
list = objExamTracker.GetExamTrackerList()
Me.grdExamTracker.DataSource = list
Me.grdExamTracker.DataBind()
End If
End Sub