Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Double refresh

Reply
Thread Tools

Re: Double refresh

 
 
Guest
Posts: n/a
 
      07-19-2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:bb294u$spe$(E-Mail Removed)...
> 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?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot convert parameter from 'double (double)' to 'double (__cdecl *)(double)' error Sydex C++ 12 02-17-2005 06:30 PM
JSP: Session parameters vanish on refresh. How do I keep them on refresh? Per Magnus L?vold Java 1 10-08-2004 02:52 PM
How do i refresh a datagrid from a pop up window without having to refresh the whole page? Pkenty ASP .Net Web Controls 0 05-28-2004 07:06 AM
using refresh button on the menu bar to refresh two frames. Jawahar Rajan ASP General 1 10-01-2003 09:20 PM
Problem with refresh button breaking automatic refresh brian lanning ASP .Net 0 07-29-2003 07:57 PM



Advertisments