>I do need to reference it from my code behind. I am setting the value in code behind, and then checking that value in java script. Is this true for input= as opposed to ASP HiddenField types? I tried both, but neither show up in my source. Interestingly in another sample page it works perfect but there isn't a master page involved and thus no Content holder.
Any control which is run server side is subject to ID mangling. The next version of ASP.NET is supposed to let you enable/disable name mangling - it annoys a lot of devs. The only way to make sure it doesn't happen is to use something like the asp:Literal control and render in the raw HTML into its Text property.