Yes correct. But there is no reason why it will not work for you. You need to re-check the code and see why are you not getting the Text and is there some place where the TextBox is getting cleared.
Secondly in order to work the TextBox must be inside updatepanel. then only it will get updated.
Finally let me know can you see the value in TextBox that you are accessing via javascript?