21-3-2009 15:45:42
B2: Xoá file Default.aspx và file config trong Project Hello
B3: Chọn đường dẫn Project Hello đặt vào thư mục bin trong Website DNN 5.00
B4: Add Reference DotNetNuke.dll(chắc chắn chỉ cần thằng này là đủ)
B5: Add control vào Project Hello tên controll là Hello.ascx
B6: Buile Project Hello
=> Build thành công
Bước 7:F5 chạy website đăng nhập user Host thành công
Bước 8:Chọn Host -> Host Difinitions ->chọn Create new Module
Bước 9: Next vài lần Create new Module thành công
bước 10: Edit module vừa Creat New, thực hiện Add Difinition ,trỏ tới đường dẫn control source)
Bước 11: Quay ra trang chủ tạo một trang bất kỳ Add Module.
Trong combobox có tên module Hello hiện lên rồi nhưng khi add thì không thấy nằm lên trong trang
còn đây là toàn bộ codeB2 của control Helle
Imports DotNetNuke
Imports DotNetNuke.Services.Localization
Imports DotNetNuke.Security
Imports DotNetNuke.Security.Roles
Imports System.Collections.Generic
Partial Public Class Hello
Inherits DotNetNuke.Entities.Modules.ModuleSettingsBase
Implements Entities.Modules.IActionable
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
#Region "Optional Interfaces"
Public ReadOnly Property ModuleActions() As DotNetNuke.Entities.Modules.Actions.ModuleActionCollection Implements DotNetNuke.Entities.Modules.IActionable.ModuleActions
Get
Dim Actions As New Entities.Modules.Actions.ModuleActionCollection
Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl(), False, SecurityAccessLevel.Edit, True, False)
Return Actions
End Get
End Property
#End Region
End Class
---
Mình đã mất khá nhiều thời gian mà không tìm được ra lỗi này, bạn xem mình làm có thiếu cái gì không nhé, mình cảm ơn bạn nhiều