Reputation: 3757
I am using ASP.NET 2.0. I have EnableViewState="false"
is set on master page and all my pages and have EnableViewState="true"
is set on some controls. It works okay on TextBox
, but DropDownList
for unknown reason absolutely ignores local EnableViewState="true"
and losses its values.
I have found one answer here https://stackoverflow.com/a/11787177/758815 , but it based on ViewStateMode
property, which seems only appeared in ASP.NET 4.0.
Any ideas on this matter?
Upvotes: 0
Views: 747
Reputation: 39777
Container's EnableViewState
setting overrides any child control EnableViewState
setting, so if it is set to false
at page level setting it to true
on any of the control has no effect.
Not sure why it works on the TextBox, perhaps it's not a part of the hierarchy.
Upvotes: 1