User Control First Load

Discussion in 'ASP .Net Web Controls' started by Jose Rodriguez, Dec 15, 2005.

  1. This problem is a tricky one. I am working on an application that loads
    dynamic user controls into a panel control. We were getting Viewstate errors
    when the user clicked refresh. To fix it, I turned off the Enableviewstate
    on the Panel. Now my logic to determine if the user control has been loaded
    for the first time is broken. How can I detect a first load on a control
    without the benefit of VIewstate? any pointers will be appreciated

    Jose
     
    Jose Rodriguez, Dec 15, 2005
    #1
    1. Advertising

  2. Jose Rodriguez

    addup Guest

    -- quote --
    We were getting Viewstate errors when the user clicked refresh.
    -- end quote --

    what kind of errors?
    I've loaded controls dynamically (is that a word?) into various
    templated controls without any problems

    --addup--
     
    addup, Dec 16, 2005
    #2
    1. Advertising

  3. The error I am getting is as follows, I thought I was sure that the control
    tree looked exactly the way it was supposed to, but the problem still
    occurs. If you have any insights, they'd be appreciated

    "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..."
    "addup" <> wrote in message
    news:...
    > -- quote --
    > We were getting Viewstate errors when the user clicked refresh.
    > -- end quote --
    >
    > what kind of errors?
    > I've loaded controls dynamically (is that a word?) into various
    > templated controls without any problems
    >
    > --addup--
    >
     
    Jose Rodriguez, Dec 16, 2005
    #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. moondaddy
    Replies:
    1
    Views:
    1,785
    moondaddy
    May 4, 2004
  2. Mad Scientist Jr
    Replies:
    0
    Views:
    639
    Mad Scientist Jr
    Mar 22, 2006
  3. Replies:
    1
    Views:
    572
    Yuriy Solodkyy
    Jun 15, 2007
  4. Jonathan Wood

    User Control to Control Other User Control

    Jonathan Wood, Jan 24, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    548
    Jonathan Wood
    Feb 2, 2010
  5. Thomas Ekegren

    Page Load fired 3 times Web user control is embedded in a custom control

    Thomas Ekegren, Sep 3, 2003, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    225
    Thomas Ekegren
    Sep 3, 2003
Loading...

Share This Page