0
votes

I am creating a dnn 5 module to extend an existing website. Everything has gone pretty well so far, but I cannot figure out how to link to another file inside my module.

Currently I have 2 files and their code behinds:

  • View.ascx
    • View.ascx.cs
  • EditMaintenance.ascx
    • EditMainenance.ascx.cs

In View.ascx I have added this line:

<asp:HyperLink ID="linkToEdit" runat="server" Text="Edit Page" NavigateUrl="EditMaintenance.ascx" />

However, when I click this link I am greeted with the following error:

HTTP Error 404.7 - Not Found The request filtering module is configured to deny the file extension.

How do I create a link to that file?

1
Isn't .ascx a user control? User controls by themselves can't be served as pages, hence the configuration to deny such requests. Why are you trying to navigate to a user control? - David

1 Answers

1
votes

David is right. Since it's a user control, you'll have to pass the full url, including the query string, into the NavigateUrl property.

Check this out: http://www.dnnsoftware.com/wiki/loc/print/page/module-navigation