Does anyone know why ASP.NET 4 has dropped the ctl00
prefix on ASP controls?
Is there a setting I have missed?
As far as i remember its up to ASP.NET to decide which prefix to use. Its a bad practice to reference on the controls with hardcoded id value.
You should use ClientId property that will always generate you proper Id:
In the example above, its calculating proper ID of the textbox and putting it into label attribute. In this way you will no more worry about keeping the same id of the control.