Learn More





Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesEdit Module User ControlEdit Module User Control
New Post
10/21/2014 2:16 PM

Hello and thank you for your support in advance,

I am developing a module using Chris Hammond s templates which have the basic View, Edit, And settings user controls.

I have added a new user control say names "formcomplete.ascx" to the project.

I am redirecting to that user control when the user clicks the submit button on the view control.

The code is:

this.Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "FormComplete", "mid=" + ModuleId.ToString()));

This all works just fine.

But, is there a way where I can edit this page(formcomplete) and/or add a module to this page?

I am using DNN 7.2.2.

I cannot seem to find a way to do this.

I worked around the issue by just updating the view control with what I had in the formcomplete control - which works fine also.

But I am just curious as to how to do this another way.

If you have achieved this - could you please give a code snippet.






New Post
11/3/2014 9:35 AM


There is no other way to do edit your module control file. Because this is a control file present inside your module.
- One way could be keep content of formcomplete in your default view page and control its visibility dynamically. 
- Another way could be, create another module add content of formcomplete to this and you can redirect from your first module to new page containing this new module.

Sibabrata Dash
Mindfire Solutions

New Post
11/3/2014 6:07 PM

Typically, this is a scenario which is much more advanced than those typically used in module development.  What you likely will want to do is use the "dispatcher" pattern.  Essentially, your main view page would look at the query string or some other context and would display one of several possible user controls depending on the context.  Because this is not an "edit" control with an edit URL, you are able to place any modules on the page that you want.  In the dispatcher pattern, instead of using editurls, you just load the user control and inject it into the parent.  I don't have a good example on hand, but you should be able to find one if you search for dispatcher or multi-page modules.

You are also not using the appropriate method for creating Edit URLs.  Effectively, the use of the controlkey and ModId in the URL means that you are creating an Edit URL.  There is actually an EditURL method on the PortalModuleBase that allows you to just pass the controlkey to get the URL.  Since your module views should all be inheriting from portalmodulebase, then EditUrl will be available directly in your view class.

Joe Brinkman
DNN Corp.
New Post
11/5/2014 2:31 PM

Thank you both for your input.

I have looked pretty hard using internet - but only came up with an old(very) post concerning this.

Do you know of any modules on codeplex that use his approach?

Just looking for a good example here.


Thanks again.

New Post
12/4/2014 2:25 PM

Here are some more resources:

I like the placeholder method

Risdall Marketing Group
erik hinds
risdall marketing group
#1 Web Design Agency in the World
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesEdit Module User ControlEdit Module User Control

These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?