Hi all
I have a problem. I can't navigate from a ModulControl to another. I develop with Dotnetnuke 6.2.5 and I use a template for development.
I added in the Extionsion Settings the Modulcontrol only with the key "newView". Everytime I click the link, I see only a blank page.
I hope someone can help me.
Here is the Code:
View.ascx
<%@ Control language="C#" Inherits="xxx.View" AutoEventWireup="false" Codebehind="View.ascx.cs" %>
<p>Hello</p>
<asp:HyperLink runat="server" id="hlnk">test</asp:HyperLink>
View.ascx.cs
public partial class View : cQuizModuleBase, IActionable
{
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
private void Page_Load(object sender, System.EventArgs e)
{
try
{
hlnk.NavigateUrl = Globals.NavigateURL("newView");
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}
public ModuleActionCollection ModuleActions
{
get
{
ModuleActionCollection Actions = new ModuleActionCollection();
Actions.Add(GetNextActionID(), Localization.GetString("EditModule", this.LocalResourceFile), "", "", "", EditUrl(), false, SecurityAccessLevel.Edit, true, false);
return Actions;
}
}
}
View2.ascx
<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="View2.ascx.cs" Inherits="xxx.View2" %>
<p>World</p>
View2.ascx.cs
public partial class View2 : cQuizModuleBase
{
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
private void Page_Load(object sender, System.EventArgs e)
{
try
{
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}
}