I am also having the same problem.....i was not using master pages ...... but when i used the same code and controls in other project ... it worked...
I coulnd understand y same code behaves differently on two seperate projects.......

its not a solution..... as mine project was verry small so i re-created it the same way.....but i too wana know the reason