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 ExtensionsModulesModulesNavigateURLNavigateURL
Previous
 
Next
New Post
4/28/2014 8:17 PM
 

I am working on developing a couple of methods to navigate to other controls within a module. Have been trying NavigateURL with interesting results, I'm ending up on a blank page with this URL: "http://dnndev.me/Test/ctl/ProfileActivity". What I'm trying to accomplish is load the control in the same page and maintain the other (an html module) modules added to the page. Here are the step I used to set this up.

My main control is View.ascx the second control I am trying to navigate to is ProfileActivity.ascx which is a "Controls" folder in my project.

I have registered the second control in the dnn manifest file.

<moduleControl>
      <controlKey>ProfileActivity</controlKey>
      <controlSrc>DesktopModules/RykeeNAICS/Controls/ProfileActivity.ascx</controlSrc>
      <supportsPartialRendering>False</supportsPartialRendering>
      <controlTitle>Profile Activity View Sub-Control</controlTitle>
      <controlType>View</controlType>
      <iconFile />
      <helpUrl />
     <viewOrder>0</viewOrder>
     <supportsPopUps>True</supportsPopUps>
</moduleControl>

In View.ascx I have:

<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="View.ascx.cs" Inherits="Rykee.Modules.RykeeNAICS.View" %>
<div>
<asp:Panel ID="Nav" runat="server">
    <div>
        <asp:Button ID="ButtonActivity" runat="server" Text="Activity" OnClick="ButtonActivity_Click"   />
    </div>
    <div class="NavigationPanel" >
        <asp:PlaceHolder runat="server" ID="P_MainInfo" />
    </div>
</asp:Panel>
</div>

In the View.ascx.cs I have:

protected void ButtonActivity_Click(object sender, EventArgs e)
        {
            Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "ProfileActivity"));
        }

In the ProfileActivity.ascx I have:

<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="ProfileActivity.ascx.cs" Inherits="Rykee.Modules.RykeeNAICS.Controls.ProfileActivity" %>
<div>
    This is Profile Activity Control
</div>

 I can accomplish what I want with a Session Variable but would like to do this with another method. Any thoughts?

 
New Post
4/29/2014 9:16 AM
 
as you're using multiple view controls but loading the non-defaulot, you'll need to specify the module id when generating the link as well, so that DNN knows which module on the page the ProfileActivity view is to load from i.e. Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "ProfileActivity", "mid=" + ModuleId.ToString())

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesNavigateURLNavigateURL


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