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

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Module Control Not DisplayingModule Control Not Displaying
Previous
 
Next
New Post
1/7/2011 5:10 PM
 
If I replace my control key url with EditURL() String url = Globals.NavigateURL("ConfirmQuery"); url = EditUrl(); Response.Redirect(url, false); url = "http://localhost/dnndev/Test/tabid/61/ctl/Edit/mid/385/Default.aspx" The tab displays "Edit Control for SimpleModule" when I press the command button. This is interesting because the Test module's Edit.ascx and code are basically empty as is my ConfirmQuery files. So where is the Test module picking up the text? I see the same thing in View as well as Edit mode. Do I need to define the control in a config file some where?
 
New Post
1/7/2011 5:18 PM
 
EditUrl generated /ctl/edit/mid/### NavigateURL with a controlkey just generates /ctl/keyname so you need to pass additional parameters (mid=###). What you really want to do is call EditUrl("ConfirmQuery")

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
1/7/2011 7:15 PM
 
Thanks Chris. I appreciate the help. I'm further along. I changed the name of the control and reset the module control. I'm still not getting to any code behind but this is a different error: Object reference not set to an instance of an object. Here's the exception. Its not telling me too much and a Google showed someone else with the same problem but no resolution. AssemblyVersion: 5.6.0 PortalID: 0 PortalName: DNNDev UserID: 1 UserName: DNNDev ActiveTabID: 61 ActiveTabName: Test RawURL: /dnndev/Test/tabid/61/ctl/ConfirmSelection/mid/385/Default.aspx AbsoluteURL: /DNNDev/Default.aspx AbsoluteURLReferrer: http://localhost/DNNDev/Default.aspx?tabid=61&error=Object+reference+not+set+to+an+instance+of+an+object. UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider ExceptionGUID: 89acf5f9-1118-40fe-b78c-5c45bd186e33 InnerException: Object reference not set to an instance of an object. FileName: FileLineNumber: 0 FileColumnNumber: 0 Method: DotNetNuke.UI.Containers.ActionButtonList.get_ModuleActions StackTrace: Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Containers.ActionButtonList.get_ModuleActions() at DotNetNuke.UI.Containers.ActionButtonList.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- Source: Server Name: ZAPLAP
 
New Post
1/7/2011 7:16 PM
 
Thanks Chris. I appreciate the help. I'm further along. I changed the name of the control and reset the module control. I'm still not getting to any code behind but this is a different error: Object reference not set to an instance of an object. Here's the exception. Its not telling me too much and a Google showed someone else with the same problem but no resolution.

AssemblyVersion: 5.6.0
PortalID: 0
PortalName: DNNDev
UserID: 1
UserName: DNNDev
ActiveTabID: 61
ActiveTabName: Test
RawURL: /dnndev/Test/tabid/61/ctl/ConfirmSelection/mid/385/Default.aspx
AbsoluteURL: /DNNDev/Default.aspx
AbsoluteURLReferrer: http://localhost/DNNDev/Default.aspx?tabid=61&error=Object+reference+not+set+to+an+instance+of+an+object.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 89acf5f9-1118-40fe-b78c-5c45bd186e33
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: DotNetNuke.UI.Containers.ActionButtonList.get_ModuleActions
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Containers.ActionButtonList.get_ModuleActions() at DotNetNuke.UI.Containers.ActionButtonList.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Server Name: ZAPLAP
 
New Post
1/8/2011 10:16 AM
 
OK, I have this working.  Thanks for pointing me in the right direction Chris! 

BTW: Navigating to a new page / control seems like it would be a good subject for another FAQ or blog post.

Here's my journey to navigate to a new page:

I added a new control using the Web User Control VS template.  That was a mistake.  Coping and renaming the base line Edit control generated by your module template would have been a better idea.

The VS template did 2 bad things:

1) It created an ASP page (.aspx) instead of a control (.ascx) with a Page directive instead of a Control directive.  That causes DNN to not recognize the control when adding it to the module.

2) It generated a page that contained both a <header runat=server> and a <form runat=server> HTML statement which was throwing an exception. DNN injects its own statements and consequently the duplicate statements are not allowed.  I had to remove these statements.  I found this by inspecting the DNN log for the site.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    XXXXXXXX
    </div>
    </form>
</body>
</html>



Additionally, I used the wrong URL to redirect to thinking the error message "object reference not set to an instance of an object" was caused by the the accurate redirect statement:

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

However, Chris suggested a much simpler way to get the URL to redirect to:  url = EditUrl("ConfirmSelection")
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Module Control Not DisplayingModule Control Not Displaying


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