“/OfficeChannel”应用程序中的服务器错误。
--------------------------------------------------------------------------------编译错误 
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误消息: CS0246: 找不到类型或命名空间名称“WebUserControl”(是否缺少 using 指令或程序集引用?)源错误: 行 29:             i = i + 1;
行 30:             System.Web.UI.WebControls.TableCell tc = new TableCell();
行 31:             WebUserControl hpc = (WebUserControl)this.LoadControl("WebUserControl.ascx"); 怎么改?怎么引用啊

解决方案 »

  1.   


    Control ctl = new Control();            if (bt == BusinessType.商业类)
                    ctl = (Control)Page.LoadControl("Control/ShopGoods.ascx");
                if (bt == BusinessType.服务类)
                    ctl = (Control)Page.LoadControl("Control/HotelRoom.ascx");
                if (bt == BusinessType.其他)
                    ctl = (Control)Page.LoadControl("Control/OtherServices.ascx");            PlaceHolder1.Controls.Add(ctl);
    我写的给你参考。
      

  2.   

    你看你前台html代码里有没有注册该控件。
      

  3.   

    以前遇见过,但后来都没再做过,好像是引用Web服务后就可以在前面加Using ** 了