0
在asp.net我使用的标签字段中,我保持ID和AssociatedControlID相同,则其不抛出任何异常Asp.net使用时,标签ID和AssociatedControlID名称不同使用C#
<asp:Label ID="Username" runat="server" AssociatedControlID="Username">Username:</asp:Label>
抛出异常
但是,当我使用的ID和AssociatedControlID不同然后我得到一个异常
<asp:Label ID="lblUsername" runat="server" AssociatedControlID="Username">Username:</asp:Label>
我收到的例外是
无法找到控制与标识'lblUsername'关联的id为'用户名'
可能是什么原因?