Skip to end of metadata
Go to start of metadata

In this section, you can learn the best practices and common scenarios to utilize the ViewStateStorage and its related features.

  1. Most recommended configuration-set
    This configuration-set is based on common scenario in web application development. If your web application used the following methodology, then this configuration is recommended for you:
    • Most user interface settings, behaviors and collection are defined in design time.
    • Styles are either applied in design time or configured in theme architecture or loaded programmatically.
    • Databound controls such as WebGrid or WebCombo are configured to use datasource controls.

      Note that this configuration will automatically become the default when you upgraded to 2007 R1 (unless you specified other values in web.config).

      This configuration consists of:
      ViewStateStorage = Client
      ViewStateItems = BehaviorConfiguration for highest performance application

  2. Configuration for highest performance application
    This configuration is recommended if your application requires highest performance.

     

    When you choose this configuration, you need to design your application carefully so that all important settings are restored during postback. This is required because the controls state are not saved and hence will not be restored during postback.
     

    This configuration consists of:
    ViewStateStorage = None

    This configuration can help to improve performance because there are no extra efforts required for serializing the control into view state.

    Note that this setting does not affect control state which is used to store important information such as latest user interface state that changed by user in runtime.

  3. Configuration for highest availability application
    This configuration is preferred for best availability to your web application. This configuration is suitable for the following scenarios:
    • The web application is running on multiple servers (web garderning) and thus requires the cache to be properly accessible across servers.
    • The web application is complex having most configurations populated dynamically at runtime (through code behind).
    • Most user interface settings, behaviors, or collections are configured at runtime (through code behind).
    • You do not want extra efforts in determining which type of property should be saved to the view state. Fundamentally you would like to force maximum reliability to your web application.

      This configuration consists of:
      ViewStateStorage = FileServer
      ViewStateItems = All

ViewStateStorage, ViewStateItems and ViewStateServerConnection can be applied to application-wide via web.config configuration.