visual studio - ASP.net content tags, and the id attribute -
i've made few master pages in visual studio, , few implementing pages, , visual studio sticks id attributes onto of tags:
<asp:content id="content1" contentplaceholderid="othercontent" ></asp:content> what gives ids? for? how access them code behind?
all controls run on server must have id attribute unique identifier. finding child controls , keeping control hierarchy in place. if have textbox sits in panel sits in updatepanel that's in webusercontrol that's in contentplaceholder that's in page, takes 1 of them not have proper id attribute in order keep connection between textbox , page.
in order access code behind need have runat="server" attribute set on tag.
Comments
Post a Comment