Hi, I'm developing a service that need to load specific settings knowing TabId and ModuleId
Private
ReadOnly
Property
SettingsControl()
As
ISettingsControl
Get
Return
TryCast(_control, ISettingsControl)
End
Get
End
Property
Private
_control
As
System.web.ui.Control
Public
Shared
Function
GetMyModuleSettings(
ByVal
_tabID
As
Integer
,
ByVal
_moduleID
As
Integer
)
As
MyModule.Entities.Settings
Dim
_module
As
ModuleInfo
Dim
_moduleCtrl
As
ModuleController =
New
ModuleController()
Dim
_objModuleControlInfo
As
ModuleControlInfo
_module = _moduleCtrl.GetModule(_moduleID, _tabID,
False
)
_objModuleControlInfo = ModuleControlController.GetModuleControlByControlKey(
"Settings"
, _module.ModuleDefID)
End
Function
Now for finish my function I need to load my control and then loadsetting, but the problem is that for loadcontrol need of page istance and I'm not in a page.
How I can load the conrol required to loadsettings call?
Try to explain better. In a normal use the missing code before End Function to solve my problem would be:
_control = ControlUtilities.LoadControl(Page, objModuleControlInfo.ControlSrc);
SettingsControl.LoadSettings();
But in my contest I have no Page available because my code is into one DLL.
Thanks for any help!