Multiple instances of a web control and ModuleID

Last post 08-08-2005 6:49 AM by frankenpeggy. 3 replies.

Sort Posts:

  • Multiple instances of a web control and ModuleID

    08-05-2005, 6:25 AM
    • Member
      30 point Member
    • frankenpeggy
    • Member since 03-09-2004, 5:29 AM
    • Posts 6
    Hello,

    I have developed a custom module which need to display data for seperate days on the same page (it's a daily diary), no probs there, I just created a web control and instantiated it 7 times on the view page.

    The problem I am having is when I am using the EditURL() function to allow display the pencil to allow people to edit entries.  Basically the moduleid is appearing as -1 which is causing DNN to not load the relevant edit form.

    I should also mention that if I refer to the Me.ModuleID in the codebehind for the web control that returns -1 also.

    Any ideas as to why this might be happening?  I can post code if required.

    Any help is greatly appreciated.

    Thanks
  • Re: Multiple instances of a web control and ModuleID

    08-05-2005, 12:11 PM
    • Participant
      1,340 point Participant
    • uzi
    • Member since 06-24-2002, 10:10 AM
    • Syracuse, NY
    • Posts 268
    I've also noticed that if the module is erroring out, like after a DNN3 upgrade all the custom modules which aren't working, also have the ModuleId object set to -1, this makes deleting troublesome module almost impossible to delete without getting tricky in SQL.

    Sorry I couldn't shed any light onto your problem. I'm sure someone else will chime in shortly.
    Thanks,
    Oliver
  • Re: Multiple instances of a web control and ModuleID

    08-05-2005, 1:55 PM
    • Contributor
      3,432 point Contributor
    • matchbx27
    • Member since 03-12-2003, 8:40 AM
    • Posts 699
    I am having the same problem.  I have a large module that will have close to 10  or 12 different sections (panels).  Depending upon what rights you have certain sections will be visible.  The main ascx page is beginning to get unmanagable, so I thought I'd break each section down into a user control.  Each section contains links to an Edit Page.  The ModuleID always shows up as -1 in the user control.

    I have managed to come up with a solution, but I don't know if it would be considered a best pratice.

    It is here
    matchbx
  • Re: Multiple instances of a web control and ModuleID

    08-08-2005, 6:49 AM
    • Member
      30 point Member
    • frankenpeggy
    • Member since 03-09-2004, 5:29 AM
    • Posts 6

    The other thread does indeed have the solution.

    Thanks for pointing me in the right direction.

Page 1 of 1 (4 items)