Reputation: 1295
I have a file called "psstep2tabstrip.ascx.cs"
where defines public partial class:
public partial class PSStep2Display :Syntegra.Manufacturing.WMCCM.Web.UI.Components.WMCCMControl
in this file I can call:
PSStep2Display control = (PSStep2Display) LoadControl("~/WMCCM/PartnerSearch/PSStep2Display.ascx");
Now in my file
companies.ascx.cs
I make the same call:
PSStep2Display control = (PSStep2Display) LoadControl("~/WMCCM/PartnerSearch/PSStep2Display.ascx");
But it cannot recognize
PSStep2Display
I already tried to include the header of "psstep2tabstrip.ascx"
to the header of "companies.ascx"
:
<%@ Reference Control="~/wmccm/partnersearch/psstep2display.ascx" %>
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
<%@ Control Language="c#" Inherits="Syntegra.Manufacturing.WMCCM.Web.UI.PartnerSearch.PSStep2TabStrip" Codebehind="PSStep2TabStrip.ascx.cs" %>
But it still cannot recognize. How could I correct this error here ?
Upvotes: 0
Views: 293
Reputation: 1299
Upvotes: 1
Reputation: 2917
You must use the name space of PSStep2Display
control as a using directive if you'd like to use the control like
PSStep2Display control = (PSStep2Display) LoadControl("~/WMCCM/PartnerSearch/PSStep2Display.ascx");
Instead of that use it like this
Control control = LoadControl("~/WMCCM/PartnerSearch/PSStep2Display.ascx");
Upvotes: 1