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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0EditURL sets ModuleID to -1EditURL sets ModuleID to -1
Previous
 
Next
New Post
1/29/2008 4:16 PM
 

I've been working on a custom module.  I'm attaching an Image Gallery to a House Listing.  So I have a list of the House listings.  To view the current Images you can either view the Listing Itself or the "gallery".  Both use the same ascx file. 

EditUrl("ListingID",(Eval("ListingID")).ToString(),"ListingImages") - Which "ListingImages" simply lists the images for that Listing.

In that "gallery" of images, you're suppose to be able to Edit or Add a new Image.  I'm using EditUrl("ListingID", ListingID.ToString(), "AddImages") for the Edit Hyperlink Image I've put in, but the url changes the Module ID (mid) to -1 instead of using what module ID it is.  So I get a blank Page.  If I place the correct mid number in (in this case 36) - Everything works as expected.

Any ideas why - or how to "Overwrite" it?  Or another possible fix?

Thanks in Advance!



Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
New Post
1/29/2008 4:53 PM
 

That's odd as EditUrl specifically adds the ModuleID to the returned url string.  Have you checked the value of ModuleID just prior to calling EditUrl?  Is it -1 at that point or is it 36?  Am I correct that your module inherits from DotNetNuke.Entities.Modules.PortalModuleBase?  What version of DNN are you using?


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
1/29/2008 9:10 PM
 

It seems as if the Module definition for the page may not be set correctly. Below is an example of the process. Also see: IActionable: Add Items to Your Module Menu (VB &C#)

 

Add a link to the Category administration page

 

To complete this task we need to:

 
  • Create a control definition for the Categories.ascx page.
  • Create a link to the page for anyone with Edit permission.
 

Create a control definition for the Categories.ascx page

 

In the DotNetNuke site, from the Host menu, select Module Definitions.

Locate the LinqThings4Sale entry and click on the Edit link.


Click the Add Control link (at the bottom of the page).

 

 

Enter:

  • Edit for Key
  • Edit Categories for Title
  • Select DesktopModules/LinqThings4Sale/Categories.ascx in the drop-down for Source
  • View for Type

and click the Update link.


   

In Visual Studio Solution Explorer, double-click on the View.ascx.cs file located in the "...\DesktopModules\LinqThings4Sale\" directory,


Next to the word PortalModuleBase enter:

, Entities.Modules.IActionable  

Click once on the line you just entered. A help menu will appear. Click on the small black down pointing arrow to display the suggestion menu. Select "Implement Interface 'DotNetNuke.Entities.Modules.IActionable".


The Interface will be implemented at the bottom of the page (you will have to scroll down the page to see it).

Change the method so it reads:  
 public DotNetNuke.Entities.Modules.Actions.ModuleActionCollection ModuleActions
{
get
{
Entities.Modules.Actions.ModuleActionCollection Actions = new Entities.Modules.Actions.ModuleActionCollection();
Actions.Add(GetNextActionID(),
"Edit Categories",
Entities.Modules.Actions.ModuleActionType.AddContent,
"",
"",
EditUrl(),
false,
SecurityAccessLevel.Edit,
true, false);
return Actions;
}
}
   
Save the page.  

When you browse to the page in the DotNetNuke site as a user who has Edit permission to the module, you will see a Edit Categories link on the configuration menu and on the module bar.
   



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
1/30/2008 1:29 PM
 

Thanks for the replies.  I'm using 04.07.00.  The ModuleId is -1 before the EditUrl() is called.  Not sure why, Let me try to be a bit clearer on where my problem lies.

Default View is - ViewAll.ascx
EditUrl("ListingID", ListingID.ToString()) or EditUrl()-> EditListing.ascx - where all info is added/edited.

EditUrl("ListingID", ListingID.ToString(), "ViewListing") -> ViewListing.ascx is a nice layout version of the info - what users will see when viewing a listing. ** This file calls gallery.ascx in it which lists all the Images for that listing.  It is in this gallery.ascx - that I am calling - EditUrl("ListingID", ListingID.ToString(), "AddImages") --- but my ModuleID is -1.

I hope this can help clear any confusion as to my issue.  Thanks for your help!



Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
New Post
1/30/2008 4:25 PM
 

Hmm seems you want to use: NavigateURL: How to make a link (VB &C#)



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0EditURL sets ModuleID to -1EditURL sets ModuleID to -1


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