Get ModuleInfo object of first module instance with a given name of the module definition

Namespace: DotNetNuke.Entities.Modules
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
ModuleInfo GetModuleByDefinition(
	int portalId,
	string definitionName
)
Visual Basic
Function GetModuleByDefinition ( 
	portalId As Integer,
	definitionName As String
) As ModuleInfo

Parameters

portalId
Type: System..::..Int32
ID of the portal, where to look for the module
definitionName
Type: System..::..String
The name of module definition (NOTE: this looks at DefinitionName, not FriendlyName)

Return Value

ModuleInfo of first module instance

Remarks

preferably used for admin and host modules

See Also