How to keep the Text of a Read only TextBox after PostBack()?

前端 未结 7 1125
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 07:05

I have an ASP.NET TextBox and I want it to be ReadOnly. (The user modify it using another control)

But when there is a PostBack()

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 07:57

    Have your other control store the value in a hidden field, and on postback, pull the value from the hidden field and push it into the textbox on the server side.

提交回复
热议问题