There are two things required for the web page and the code-behind to
interact with each other.
1) The tag on the web page must have the runat="server" defined.
2) A variable in the code-behind must be defined, as a protected instance
member, with the same name as the ID in the web page. This is how ASP.NET
knows what variable to map to what tag.
Once the tag is mapped to a variable, then you can operate on the variable
with all actions affecting the tag when rendered.
If you add something using the designer, it should place the variable
reference for you in the code-behind. From my experience, the designer is a
bit flaky when it comes to this code generation. More often then not, I
have to define the variables myself, so knowing the interaction between the
page and the code-behind is more then academic.