$get() and $find() with AJAX.NET

♀尐吖头ヾ 提交于 2019-12-05 19:48:13

Well that depends what the label is contained in. In some controls it will be Label1 and work, in others it won't be. Don't chance it.

So on a simple page it gets rendered as Label1:

   <form id="form1" runat="server">
    <div>
    <asp:Label ID="Label1" Text="test" runat="server"></asp:Label>
    </div>
    </form>

On a more complex page it will be rendered as something else (ctl00_head_Label1 in my case), using a masterpage as an example:

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 <asp:Label ID="Label1" Text="test" runat="server"></asp:Label>
</asp:Content>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!