找不到类?
using System;
using System.IO;
using System.Web.UI;
using FriendsReunion.Controls;
namespace FriendsReunion
{
/// <summary>
/// FriendsBase 的摘要说明。
/// </summary>
public class FriendsBase:System.Web.UI.Page
{
protected string HeaderMessage=string.Empty;
protected string HeaderIconImageUrl=string.Empty;
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
//Get a reference to the form control
Control form=Page.Controls[1];
//Create and place the page header
FriendsHeader header;
header=(FriendsHeader)LoadControl(Request.ApplicationPath+Path.AltDirectorySeparatorChar+"Consoles/FriendsHeader.ascx");
header.Message=HeaderMessage;
header.IconImageUrl=HeaderIconImageUrl;
form.Controls.AddAt(0,header);
//Add the SubHeader custom controls
form.Controls.AddAt(1,new SubHeader()); //这里提示C:\Inetpub\wwwroot\FriendsReunion\FriendsBase.cs(26): 找不到类型或命名空间名称“SubHeader”(是否缺少 using 指令或程序集引用?),该如何解决???谢谢!!!
//finally,add the page footer
FriendsFooter footer;
footer=(FriendsFooter)LoadControl(Request.ApplicationPath +Path.AltDirectorySeparatorChar+"Consoles/FriendsFooter.ascx");
form.Controls.AddAt(Page.Controls[1].Controls.Count,footer);
//Render as usually
base.Render(writer);
}
}
}