首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

You can only have one <head runat="server"> control on a page解决方

2013-01-26 
You can only have one head runatserver control on a page运行时候 提示You can only have one he

You can only have one <head runat="server"> control on a page
运行时候 提示
You can only have one <head runat="server"> control on a page
前台:


                                Collapsed="false"
                                TextLabelID="show"
                                ExpandedText="隐藏申请单"
                                CollapsedText="显示申请单"
                                >


后台:
 GetITBillDetail fuc = new GetITBillDetail();
        string controlPath = fuc.getControlName(HidBillType.Value);
        Control c = Page.LoadControl(controlPath);
        p2.Controls.Add(c);  //这里报错

[解决办法]
页面有多个 <head runat="server"> 定义,你在页面里搜下是不是多个head,去掉多余的保留一个 <head runat="server"> 就行了
[解决办法]
那就还有多个<head>

热点排行