Is there a way in DNN 5, 6 or 7, via the DNN API to programmatically display our custom module version number (the one we set in the module manifest) so that we don't have to manually change it on each new version.

This would be handy so we can be 100% confident of the version our customers use.

有帮助吗?

解决方案

Here is a function to help you with that.

public string GetModuleVersion(string moduleName)
{
    DesktopModuleController objModules = new DesktopModuleController();
    DesktopModuleInfo info = objModules.GetDesktopModuleByModuleName(moduleName);
    return info.Version;
}

Example

string ver = GetModuleVersion( "DigArticle" );
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top