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()
, The text get reset to an empty string.
I understand that if you set the ReadOnly
property to True
of a TextBox
it's content does not get saved through PostBack()
.
Is there a way to keep the content after PostBack()
and make the TextBox
not editable by the user?
I tried to set the Enabled
property to False
,But still the content doesn't save after PostBack()
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…