enableViewState for single control

A

AC

Hello, All

Is it possible to set enableViewState='true' for single control on a page
with enableViewState='false'. In particular I am interested in DropDownList,
but neither using IDE to set controls attribute nor <asp:dropdownlist
EnableViewState="True" ...> seems to work.

What is wrong here? Any reference for a good description of enableViewState
use cases will be great.

And I cann't figure our, how does Page.enableViewState relates to
DropDownList.enableViewState (if does).

Thanks for you time!
Alex.
 
M

Marina

Let's say you have a Panel with a textbox in it. The Panel's Visible
property is False, the Textbox's is True.

Do you expect to see the textbox? No. When the panel is invisible, so is
everything else in it, regardless of its own visibility.

Same goes for viewstate.

If you turn off viewstate for the page, the viewstate settings for the
controls on the page is ignored.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top