The problem is that postback data is not loaded in Page_Init - it is loaded between Page_Init and Page_Load
Since the Actrion collection is queried in Page_Init, we can not control the action visibility from the control values, as they are not available before Page_Load.
I am trying to add the action to the container in my Module_load, using the following scenario:
1 - Module implements IActionable
2 - ModuleActionCollection returned is empty
3 - In module_load Event handler:
Dim
ctlContainer As UserControl = Me.ContainerControl
Dim objActions As DotNetNuke.UI.Containers.ActionBase = CType(FindActionControl(ctlContainer), DotNetNuke.UI.Containers.ActionBase)
objActions.MenuActions.Add(_addContentAction)
But this did not work, I assume the objActions collection is parsed in Container_Init
Any suggestions?
(The simple workaround is to not use the DotNetNuke action and just put a button on the page, but that is not as nice)