Click here to Skip to main content
16,016,180 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Ok i have an ASP.NET web form, i've always wondered why at runtime the ID's change of my html elements if they're placed inside of a asp:control

e.g
ASP.NET
<asp:Content ID="Content2" ContentPlaceHolderID="ContentBody"  runat="server">
<img id="produt_image">



at runtime becomes
HTML
<img id="ContentBody_product_image">


why does it do this, and does it affect naming / calling that img box from the code behind, would i ref it using product_image or the newly runtime id?
Posted

1 solution

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900