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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0References to User ControlsReferences to User Controls
Previous
 
Next
New Post
4/4/2008 1:06 PM
 

Hi,

I created a Module using the starter kit and installed it and added it to a page successfully in my DNN site.

In that module i want to call User Controls that calls other User Controls consecutively.

I'm working with a team so using MultiViews is not an option.

The problem is, when i add a Reference to my User Control (for testing purposes that UC consists only in a label), the module stops working.

=====================================

Source Code:

ViewFormacao.ascx:

<%@ Control language="C#" Inherits="YourCompany.Modules.Formacao.ViewFormacao" CodeFile="ViewFormacao.ascx.cs" AutoEventWireup="true"%>
<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>

ViewFormacao.ascx.cs:

(...)

        protected void Page_Load(System.Object sender, System.EventArgs e)
        {           


        }

(...)

//Basically,  I deleted everything in Page_Load and the datalist event created by the starter kit.

=====================================

That code works fine but when i add a:

<%@ Reference Control="~/Teste.ascx" %>

to ViewFormacao.ascx the module stops working.

=====================================

More Source Code:

Teste.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Teste.ascx.cs" Inherits="Teste" %>
<asp:Label ID="Label1" runat="server" Text="User Control"></asp:Label><br />

 

Teste.ascx.cs

(...)

//using stuff including the DotNetNuke, DotNetNuke.Common, etc.

namespace YourCompany.Modules.Formacao
{
public partial class Teste : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
}

=====================================

The error i get is:

Module Load Warning
One or more of the modules on this page did not load. This may be temporary. Please refresh the page (click F5 in most browsers). If the problem persists, please let the Site Administrator know.

I also tried the steps in NavigateURL: How to make A DotNetNuke® link tutotial by Michael Washington but the outcome was odd.

It displays the same above message but loads the User Control right below it. But the User Control is empty.

So, the question is...can we use References in DNN just like we use in normal asp.net?

Thank you for your time,

Tiago Costa

 
New Post
4/6/2008 4:07 PM
 

Hmmm, no replies...

Maybe i was too confusing.

How about this, is it possible to add a  "<%@ Reference Control="~/Teste.ascx" %>" to DNN modules?

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0References to User ControlsReferences to User Controls


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