view state error

Discussion in 'ASP .Net' started by Michael, Jan 26, 2004.

  1. Michael

    Michael Guest

    Hi,
    Any one know the problem of the following error:
    Thanks,
    m


    Failed to load viewstate. The control tree into which
    viewstate is being loaded must match the control tree
    that was used to save viewstate during the previous
    request. For example, when adding controls dynamically,
    the controls added during a post-back must match the type
    and position of the controls added during the initial
    request.
    Failed to load viewstate. The control tree into which
    viewstate is being loaded must match the control tree
    that was used to save viewstate during the previous
    request. For example, when adding controls dynamically,
    the controls added during a post-back must match the type
    and position of the controls added during the initial
    request.
    Description: An unhandled exception occurred during the
    execution of the current web request. Please review the
    stack trace for more information about the error and
    where it originated in the code.

    Exception Details: System.Web.HttpException: Failed to
    load viewstate. The control tree into which viewstate is
    being loaded must match the control tree that was used to
    save viewstate during the previous request. For example,
    when adding controls dynamically, the controls added
    during a post-back must match the type and position of
    the controls added during the initial request.

    Source Error:

    An unhandled exception was generated during the execution
    of the current web request. Information regarding the
    origin and location of the exception can be identified
    using the exception stack trace below.



    Stack Trace:


    [HttpException (0x80004005): Failed to load viewstate.
    The control tree into which viewstate is being loaded
    must match the control tree that was used to save
    viewstate during the previous request. For example, when
    adding controls dynamically, the controls added during a
    post-back must match the type and position of the
    controls added during the initial request.]
    System.Web.UI.Control.LoadViewStateRecursive(Object
    savedState) +189
    System.Web.UI.Control.LoadViewStateRecursive(Object
    savedState) +414
    System.Web.UI.Control.LoadViewStateRecursive(Object
    savedState) +414
    System.Web.UI.Control.LoadViewStateRecursive(Object
    savedState) +414
    System.Web.UI.Control.LoadViewStateRecursive(Object
    savedState) +414
    System.Web.UI.Control.LoadViewStateRecursive(Object
    savedState) +414
    System.Web.UI.Control.LoadViewStateRecursive(Object
    savedState) +414
    System.Web.UI.Control.LoadViewStateRecursive(Object
    savedState) +414
    System.Web.UI.Page.LoadPageViewState() +306
    System.Web.UI.Page.ProcessRequestMain() +423
     
    Michael, Jan 26, 2004
    #1
    1. Advertising

  2. Is this a user control you created?
    Please give me the specifics of what you are trying to do and how. The error
    indicates an problem in the parent-child relationship in the control
    hierarchy.

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Michael" <> wrote in message
    news:448301c3e44f$ecb1a400$...
    >
    > Hi,
    > Any one know the problem of the following error:
    > Thanks,
    > m
    >
    >
    > Failed to load viewstate. The control tree into which
    > viewstate is being loaded must match the control tree
    > that was used to save viewstate during the previous
    > request. For example, when adding controls dynamically,
    > the controls added during a post-back must match the type
    > and position of the controls added during the initial
    > request.
    > Failed to load viewstate. The control tree into which
    > viewstate is being loaded must match the control tree
    > that was used to save viewstate during the previous
    > request. For example, when adding controls dynamically,
    > the controls added during a post-back must match the type
    > and position of the controls added during the initial
    > request.
    > Description: An unhandled exception occurred during the
    > execution of the current web request. Please review the
    > stack trace for more information about the error and
    > where it originated in the code.
    >
    > Exception Details: System.Web.HttpException: Failed to
    > load viewstate. The control tree into which viewstate is
    > being loaded must match the control tree that was used to
    > save viewstate during the previous request. For example,
    > when adding controls dynamically, the controls added
    > during a post-back must match the type and position of
    > the controls added during the initial request.
    >
    > Source Error:
    >
    > An unhandled exception was generated during the execution
    > of the current web request. Information regarding the
    > origin and location of the exception can be identified
    > using the exception stack trace below.
    >
    >
    >
    > Stack Trace:
    >
    >
    > [HttpException (0x80004005): Failed to load viewstate.
    > The control tree into which viewstate is being loaded
    > must match the control tree that was used to save
    > viewstate during the previous request. For example, when
    > adding controls dynamically, the controls added during a
    > post-back must match the type and position of the
    > controls added during the initial request.]
    > System.Web.UI.Control.LoadViewStateRecursive(Object
    > savedState) +189
    > System.Web.UI.Control.LoadViewStateRecursive(Object
    > savedState) +414
    > System.Web.UI.Control.LoadViewStateRecursive(Object
    > savedState) +414
    > System.Web.UI.Control.LoadViewStateRecursive(Object
    > savedState) +414
    > System.Web.UI.Control.LoadViewStateRecursive(Object
    > savedState) +414
    > System.Web.UI.Control.LoadViewStateRecursive(Object
    > savedState) +414
    > System.Web.UI.Control.LoadViewStateRecursive(Object
    > savedState) +414
    > System.Web.UI.Control.LoadViewStateRecursive(Object
    > savedState) +414
    > System.Web.UI.Page.LoadPageViewState() +306
    > System.Web.UI.Page.ProcessRequestMain() +423
    >
    >
    >
    >
    >
     
    Alvin Bruney [MVP], Jan 27, 2004
    #2
    1. Advertising

  3. Michael

    mamujeeb

    Joined:
    Sep 25, 2007
    Messages:
    2
    Failed to Load View State - GridView Dropdown error.

    I am getting the same error.

    I have Dropdownlist under GridView control bind to DataSource. First time i try to update the list will work fine but second time update is giving this error.

    Any help will be appreciated.

    Thanks

    Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.





     
    mamujeeb, Sep 25, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer
    Replies:
    1
    Views:
    602
    VB Programmer
    Jul 10, 2003
  2. Vinod I
    Replies:
    2
    Views:
    2,202
    Alvin Bruney [MVP]
    Mar 2, 2004
  3. =?Utf-8?B?QWxiZXJ0IFBhc2N1YWw=?=

    View State error

    =?Utf-8?B?QWxiZXJ0IFBhc2N1YWw=?=, Jun 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    341
    =?Utf-8?B?QWxiZXJ0IFBhc2N1YWw=?=
    Jun 3, 2004
  4. Michael Singer

    Re: error in view state.

    Michael Singer, Sep 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    368
    Michael Singer
    Sep 15, 2004
  5. Parthiv Joshi
    Replies:
    1
    Views:
    708
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page