Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Viewstate
Message
 
To
25/10/2004 14:23:29
General information
Forum:
ASP.NET
Category:
Web forms
Title:
Environment versions
Environment:
ASP.NET
OS:
Windows 2000 SP3
Database:
DB2
Miscellaneous
Thread ID:
00954353
Message ID:
00954419
Views:
11
Viewstate usually isn't required for textboxes, but be really careful with enabled/disabled. When a textbox is not enabled it will not post back its values (at least not through the POST data). This means ASP.NET can't pick up the data. I think what you're seeing with no values is an artifact of a postback where the values are not getting posted due to the disabled state.

I'm not sure offhand if ViewState might fix this or not - ASP.NET might figure out that a disabled control can't post back and therefore store its data in Viewstate - you have to try that.

A better thing to do might be to use ReadOnly and set the color to make it look like it's disabled.

+++ Rick ---



>i have an asp.net web page with some textboxes, an image button, and a calender. when i click on the image button it makes the calender visible or invisible. the problem is, some of my textboxes are losing their text and becoming blank. All the controls are on a panel, but only some of the textboxes are blanking, not all. I am noticing one thing. The boxes that keep the text have enabled = false. Only the text boxes that are enabled are losing the text. Doesn't make much sense to me. any suggestions?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform