[CLOSED] ViewState

  1. #1

    [CLOSED] ViewState

    I'm having a problem using page's viewstate:
    - I set my viewstate["123"] = true on pageload when it's not postback.
    - In the change directevent of a textfield i change it to false.
    - On the click directevent of a button i read it. It should be false, since it was the last value i've put in it, but it is always true. I guess it's always picking the first value i put on it.
    Could it be related to asyncpostbacks? Have you got a suggestion on how can i work it around, or there is something similar to viewstate implemented by coolite i could use in this situation?
    Last edited by Daniil; Apr 01, 2011 at 12:37 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Would about Session?

    Personally, I always try to avoid ViewState and disable it at all.
  3. #3
    Hi,

    By default, DirectEvents do not transfer ViewState.

    You can also set ViewStateMode="Enabled" on the DirectEvent config.

    Example

    <Click OnEvent="Button1_Click" ViewStateMode="Enabled" />
    Although, I would also recommend trying to avoid enabling ViewState mode. It can be a real pig on performance.
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] ViewState value
    By asztern in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 01, 2010, 11:14 AM
  2. [CLOSED] DirectMethod without Viewstate
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 24, 2010, 5:05 PM
  3. [CLOSED] How to set viewstate from client?
    By wazige in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 02, 2009, 6:30 AM
  4. [CLOSED] AjaxMethods without viewstate
    By Pablo in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 04, 2009, 5:35 AM
  5. [CLOSED] ViewState when using AjaxEvent
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Mar 05, 2009, 9:30 AM

Tags for this Thread

Posting Permissions