Re: Double refresh

Discussion in 'ASP .Net' started by Guest, Jul 20, 2003.

  1. Guest

    Guest Guest

    I am struggling with this now as well. But Kevin is way off on the cause I
    think. This has to do with the AutoEventWire up configuration of the page
    and the AutoPostBack attribute of the control (I think). I am still looking
    into this. Will let you know what I find out.

    Gordon Humphrey
    enterLogic Corporation


    "Kevin Spencer" <> wrote in message
    news:%...
    > There's something wrong with the structure of your custom Control,

    although
    > I can only guess at what it is. The first clue I get is that you mention
    > implementing BOTH the IPostBackDataHandler and IPostBackEventHandler
    > interfaces. Although I've never tried implementing both (you should only
    > implement one), I suspect that this might have something to do with it.
    >
    > HTH,
    >
    > Kevin Spencer
    > Microsoft FrontPage MVP
    > Internet Developer
    > http://www.takempis.com
    > A watched clock never boils.
    >
    > "Marek Starosielec" <> wrote in message
    > news:bb294u$spe$...
    > OK, here it goes:
    >
    > There is a ASP.NET page, with custom control on it. Control displays data
    > from database, allows deleting, editing and adding new records (something
    > like grid). So I start the page, click 'Add new data' button (part of

    custom
    > control), fill all necessary data and click 'Submit' button. Data is

    posted
    > by IPostBackDataHandler interface and events are handled by
    > IPostBackEventHandler interface.
    >
    > 1) I click 'Add new data' button: Page_Load occurs, then custom control
    > Render event.
    > 2) I fill data and click 'Submit' button. LoadPostData and
    > RaisePostBackEvent in custom control occurs, then Page_Load, then Render.
    >
    > It should stop at this point but sometimes LoadPostData and
    > RaisePostBackEvent fire one more time. This causes adding 2 rows to
    > database. What's funny, during record adding, I change variable in
    > viewstate, indicating that data was added (so even if event occurs twice,
    > data should be added only once). But if event occurs second time,

    viewstate
    > looses all chages (it is identical, like in first event occur).
    >
    > Any ideas?
    >
    >
    Guest, Jul 20, 2003
    #1
    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. brian lanning
    Replies:
    0
    Views:
    573
    brian lanning
    Jul 29, 2003
  2. Per Magnus L?vold
    Replies:
    1
    Views:
    5,082
    John C. Bollinger
    Oct 8, 2004
  3. Sydex
    Replies:
    12
    Views:
    6,444
    Victor Bazarov
    Feb 17, 2005
  4. Pkenty
    Replies:
    0
    Views:
    376
    Pkenty
    May 28, 2004
  5. Jawahar Rajan
    Replies:
    1
    Views:
    274
    Adrienne
    Oct 1, 2003
Loading...

Share This Page