Hello,
my View.ascx file is setup as follows:
*******************************
<%@ Control language="C#" Inherits="DotNetNuke.Modules.HB_HPImageRotator.View" AutoEventWireup="false" Codebehind="View.ascx.cs" %>
<%@ Register TagPrefix="mat" TagName="TestUC" Src="~/TestUC.ascx" %>
<asp:PlaceHolder ID="plhld" runat="server">
myPlaceHolder
</asp:PlaceHolder>
*******************************
the problem is that when I start typing <mat
intellisense won't display the possibility to add TestUC
project setup: I created a module HB_HPImageRotator from the regular dotnetnuke.com template In Visual Studio 2010, I added a WebUserControl to the root of the project TestUC.ascx.
TestUC.ascx:
**************************
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TestUC.ascx.cs" Inherits="DotNetNuke.Modules.HB_HPImageRotator.TestUC" %>
<asp:Label ID="lblTest" runat="server" Text="My Test Label"></asp:Label>
****************************
TestUC.ascx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DotNetNuke.Modules.HB_HPImageRotator
{
public partial class TestUC : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
***********************
any ideas why the control is not available? If I create a custom web user control under a website project, everything works fine.
if I load the control from code (View.ascx.cs), it works, I mean the Page_Load method gets called..etc.
TestUC tuc = new TestUC();
but
plhld.Controls.Add(tuc);
won't display the control, although the constructor gets called...
Thx for any insight.