Difference between Control's ViewState and ControlState?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Edward

    Difference between Control's ViewState and ControlState?

    I am reading MSDN doc about Control's ViewState and ControlState. I got
    myself quite puzzled. I see that the Control class has four virtual
    functions:

    LoadControlStat e
    LoadViewState
    SaveControlStat e
    SaveViewState

    But a Control has only ViewState property but no ControlState.

    Can anyone clarify on the difference between Control's ViewState and
    ControlStae?

    Thanks.
  • =?Utf-8?B?TWFuaXNo?=

    #2
    RE: Difference between Control's ViewState and ControlState?

    Hi,

    you can refer to following two links for detailed information about the
    Control state and ViewState of the control. You can disable the Viewstate of
    the control but not the Controlstate. controlstate is also stored in the
    Hidden Field in HTML under_viewstate .

    Behavioral state for a control should be kept in control state, and UI state
    (its contents) should be kept in view state.

    Expert-led tech and creative training to master your craft. Unlimited and online.




    Regards,
    Manish
    MESCIUS USA Inc. has JavaScript and .NET UI controls, datagrids, reporting solutions, spreadsheets, document APIs and more to take your applications further.


    "Edward" wrote:
    I am reading MSDN doc about Control's ViewState and ControlState. I got
    myself quite puzzled. I see that the Control class has four virtual
    functions:
    >
    LoadControlStat e
    LoadViewState
    SaveControlStat e
    SaveViewState
    >
    But a Control has only ViewState property but no ControlState.
    >
    Can anyone clarify on the difference between Control's ViewState and
    ControlStae?
    >
    Thanks.
    >

    Comment

    • Edward

      #3
      Re: Difference between Control's ViewState and ControlState?

      Thanks.

      Manish wrote:
      Hi,
      >
      you can refer to following two links for detailed information about the
      Control state and ViewState of the control. You can disable the Viewstate of
      the control but not the Controlstate. controlstate is also stored in the
      Hidden Field in HTML under_viewstate .
      >
      Behavioral state for a control should be kept in control state, and UI state
      (its contents) should be kept in view state.
      >
      Expert-led tech and creative training to master your craft. Unlimited and online.

      >

      >
      Regards,
      Manish
      MESCIUS USA Inc. has JavaScript and .NET UI controls, datagrids, reporting solutions, spreadsheets, document APIs and more to take your applications further.

      >
      "Edward" wrote:
      >
      >I am reading MSDN doc about Control's ViewState and ControlState. I got
      >myself quite puzzled. I see that the Control class has four virtual
      >functions:
      >>
      >LoadControlSta te
      >LoadViewStat e
      >SaveControlSta te
      >SaveViewStat e
      >>
      >But a Control has only ViewState property but no ControlState.
      >>
      >Can anyone clarify on the difference between Control's ViewState and
      >ControlStae?
      >>
      >Thanks.
      >>

      Comment

      Working...