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?