Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  References to User Controls
Previous Previous
 
Next Next
New Post 4/4/2008 11:06 AM
User is offline tacosta
18 posts
10th Ranked


References to User Controls 

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 2:07 PM
User is offline tacosta
18 posts
10th Ranked


Re: References to User Controls 

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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  References to User Controls
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Where Every Home is an Investment
Where Every Home is an Investment
www.nestbrokers.com
Faculty of Graduate and Postdoctoral Studies
At the graduate level, the University of Ottawa offers more than 180 graduate certificates, master's degrees and PhDs, as well as interdisciplinary programs such as Women's Studies and Canadian Studies. Many postdoctoral opportunities are available in both the sciences and the humanities. For further information, please consult the site of the Faculty of Graduate and Postdoctoral Studies.
www.grad.uottawa.ca
Vekkin Solutions
Vekkin Solutions provides complete website solutions and custom module development to churches and small businesses.
www.vekkin.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP