[英]The server tag is not well formed
here'is我的HTML:
<asp:Label ID="EmployeeIDlbl" runat="server" Text="<%# GetLabelCaption("Judges", "Employee Number",CaptionType.EditLabel) %>"></asp:Label>
其中: CaptionStyle
是我先前创建的Enumerator
,并且GetLabelCaption
函数返回从sql数据库获取的字符串。
我想知道错误在哪里?!
将单引号放在您提及文本的位置,如下所示:
<asp:Label ID="EmployeeIDlbl" runat="server" Text='<%# GetLabelCaption("Judges", "Employee Number",CaptionType.EditLabel) %>'></asp:Label>
这会起作用
您需要将Text内容放在单引号(' ')
而不是双引号(" ")
。 所以试试这个
<asp:Label ID="EmployeeIDlbl" runat="server" Text='<%# GetLabelCaption("Judges", "Employee Number",CaptionType.EditLabel) %>'></asp:Label>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.