Which of these is correct

T

Tony Johansson

Hello!

I read in a book and it says the following.
"The ViewState can be turned off for all controls within a page by setting
the EnableViewState property to false with the Page directive: The ViewState
can also be configured on a control by setting the EnableViewState property
of a control. No matter what the page configuration says, when the
EnableViewState property is defined for the control, the control value is
used. The value of the page configuration is used only for these controls
when the ViewState is not configured."

In a article on the net I found this text which is not what the above text
says. It says
"If you turn page's ViewState off then there is no way for you to enable
ViewState for specific components. This is because ViewState is serialize
recursively so when if the page is not allowing ViewState it will not
serialize the ViewState for any of it's child controls"

So my question is simple if you set the EnableViewState off in the page
directive can you then enable any control by turning on it ViewState ?

//Tony
 
A

Arne Vajhøj

I read in a book and it says the following.
"The ViewState can be turned off for all controls within a page by setting
the EnableViewState property to false with the Page directive: The ViewState
can also be configured on a control by setting the EnableViewState property
of a control. No matter what the page configuration says, when the
EnableViewState property is defined for the control, the control value is
used. The value of the page configuration is used only for these controls
when the ViewState is not configured."

In a article on the net I found this text which is not what the above text
says. It says
"If you turn page's ViewState off then there is no way for you to enable
ViewState for specific components. This is because ViewState is serialize
recursively so when if the page is not allowing ViewState it will not
serialize the ViewState for any of it's child controls"

So my question is simple if you set the EnableViewState off in the page
directive can you then enable any control by turning on it ViewState ?

Why not try it?

Arne
 

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

Top