Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

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 ExtensionsModulesModulesCreating a Module with multiple multiple ascx pages/controlsCreating a Module with multiple multiple ascx pages/controls
Previous
 
Next
New Post
12/30/2009 3:34 PM
 

I am building a new module that has an Upload capability for registered users only. I also want to build a control that allows them to view their uploads. So basically a "Upload" page and a "View My Uploads" page. I have successfully built the module with the Upload page, settings page, and I removed the edit page (there's nothing to edit). I am going to build an Admin Upload module seperate from this, that's why I didn't need the edit page.

I can't figure out how to tie the ascx pages together in the module. I have a "ViewUploader.ascx" and "MyUploads.ascx" page. I have placed the module on a page called "Uploads.aspx". How can I place the "ViewUploader.ascx" on a seperate page, lets say "MyUploads.aspx". I am thinking this can't be done without creating seperate modules??? 

If the controls have to exist on the same page, how do I correctly link from the "ViewUploader.ascx" control to the "MyUploads.ascx"?

I have tried monkeying around with this code, but am not exactly sure hot to "hook" it up correctly. The two ascx pages are in the same directory.

Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl(), False, Security.SecurityAccessLevel.Edit, True, False)

Any help will be greatly appreciated. Examples, Advice, Links, etc.

Thanks!

Frank

 
New Post
12/30/2009 4:37 PM
 

This depends on your desied behavior.

If you want them on separate pages, then create two module definitions, one for each.

If you want to just toggle views, add a control definition in your manifest and using the "Key" that you specify you can setup a link to redirec to the other page.

Something like.

DotNetNuke.Common.Globals.NavigateUrl(this.TabId, "MyKey", "mid=" + this.ModuleId.ToString());

Will get you the URL.  (NOTE: wrote that from memory, so please double check....)


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
12/30/2009 5:49 PM
 

Thanks for the reply, Mitch.

For the sake of learning module development better I will try out both methods. For creating two seperate modules, if I place the two modules on seperate pages, how can I make sure they link to each other correctly? Example, on the "ViewUploads" page how do I get a link that says "View My Uploads" to always point to the "My Uploads" module no matter what page either of them are dropped into.

Thanks again,

Frank

 
New Post
12/31/2009 9:30 AM
 
Frank Matteson wrote:

Thanks for the reply, Mitch.

For the sake of learning module development better I will try out both methods. For creating two seperate modules, if I place the two modules on seperate pages, how can I make sure they link to each other correctly? Example, on the "ViewUploads" page how do I get a link that says "View My Uploads" to always point to the "My Uploads" module no matter what page either of them are dropped into.

Thanks again,

Frank

 Frank,
 
I don't think you will be able to easily do the 2 module scenario like you described.  If you knew you were only going to have one instance of each module on a site then you could pull the info for the link but it breaks down when you have multiple.  (You could just default to the first one found I guess)
 
I would go with the one module approach.  In your ascx file just have 2 panels.  One for the upload and one for the display.  Set the visibility of the panels to show what you want. (upload or display)  (Say start with Display and then have a link that displays the upload panel)  That way your code is pretty straight forward and no worrying about what page you are on. 
 
Hope this helps.
 
Robert
 
New Post
1/3/2010 8:15 AM
 

I'm trying a similar aproche, in asp.net I just do LoadControl(...)...

Where how can I do that? Because my control is in the same namespace, but I can't acess to him...

Why?

Edit: My mistake, miss the .ascx no LoadControl! Sorry about that!

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCreating a Module with multiple multiple ascx pages/controlsCreating a Module with multiple multiple ascx pages/controls


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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out