Andy Smith's Blog

Page.RegisterStartupScript('Andy', 'MetaBuilders_WebControls_GainKnowledge();');

OneClick revisited

I've finally gotten around to updating my OneClick control to make it work in applications where pages are served in sequence.

The way OneClick works is by storing a token in a hidden field in the form. If the user posts twice, the token has been logged by the first post, and the OneClick.IsValid property will be false.

Unfortunately, in the old version of OneClick, the form post tracking token was removed when the page was done processing. But this was the wrong thing to do because when pages are served in sequence, the the second, invalid, post was deemed valid because the token had been removed by the first post. Oops :)

Anyway, if anybody using OneClick still has problems with it, let me know.

Comments

sdf said:

dsf
# April 28, 2004 8:16 AM

sdf said:

sadf
# April 28, 2004 8:16 AM

sdf said:

sadf
# April 28, 2004 8:16 AM

sdf said:

sdfaf
# April 28, 2004 8:17 AM

sdf said:

werqerqer
# April 28, 2004 8:17 AM

sdf said:

werqerqer
# April 28, 2004 8:17 AM

sdf said:

werqerqer
# April 28, 2004 8:17 AM

sdf said:

werqerqer
# April 28, 2004 8:17 AM

TrackBack said:

# June 21, 2004 5:13 AM

pkailas said:

Can you give me a sample usage?

Like in a button click event, do I do something like:

If OnceClick1.IsValid Then

  <some code here>

else

  <some other code here>

end if

# January 7, 2010 5:34 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)