Search code examples
dotnetnukedotnetnuke-moduledotnetnuke-6dotnetnuke-imc

How to add module user control on page in DNN 6?


enter image description here

(This is how my module definition looks like.)

I am using DNN 6 and I have module with following user controls. Now when I add the module to be added on page it always show the View.ascx; so how can I show pagestarter.ascx?

My goal is I have page A and it should show VIew.ascx and I have page B that should show PageStarter.ascx.


Solution

  • To do this you have three options.

    1. Add a second module definition and add the second control to that as the item with no key. This will make it so everytime you add the module to a page both are added. You can then just delete the one you don't want.

    2. Create the other as a separate module which will give a second item to add

    3. Control the loading yourself within the main ascx that is registered by dynamically loading your desired control.