How to determine ASP.NET's generated ID's from codebehind?
- by Matthew Scharley
In ASP.NET, when you give a tag an ID it generates a unique HTML id for the element based on the control hierachy, ie.
<asp:Panel ID="test" runat="server">
...
</asp:Panel>
<!-- Becomes... -->
<div id="plc_lt_zoneContent_PagePlaceholder_PagePlaceholder_lt_test_test">
...
</div>
Is there some way of determining the generated id in the codebehind file? I need to generate some Javascript that uses the id.