Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text box losing value on refresh

Status
Not open for further replies.

ksbrace

Programmer
May 13, 2000
501
US
How do I prevent the text box from losing it's value when the page is refreshed. Thanks,

 
It depends on what you mean by refreshed -

If you mean if a user inputs a value into the textbox and then clicks "refresh" on the page, the inputted value will be cleared - it cannot be saved.

If you mean that the value is being cleared when the user clicks a button and the page posts back, then I would make sure that you have enabled View State.

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
also if you are doing something with the text box in Page_Load be sure to check Page.ispost back.

ex

If Not Page.IsPostBack Then
'initialize text box
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top