.Net Changes the element IDs

前端 未结 5 1474
离开以前
离开以前 2020-12-19 19:03

.Net is kindly changing the element ids on my pages by appending a ct100_ to them. As much as I appreciate microsoft trying to help me keep from duplicating ids on my site,

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-19 19:33

    You will need to:
    override regular controls' behavior to decouple the Control.UniqueID property from the Control.ID property
    override naming container controls to allow us to control how ID generation is done and how to find a control

    References:
    http://nunogomes.net/post/2008/06/02/ASPNET-Controls-Improving-automatic-ID-generation-Architectural-Changes-(-Part-3).aspx


    http://weblogs.asp.net/nunogomes/archive/2008/06/04/asp-net-controls-improving-automatic-id-generation-architectural-changes-part-3.aspx


    http://forums.asp.net/t/1394822.aspx


提交回复
热议问题