Which of these is correct

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
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
 
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
 
Back
Top