If using SQL Server:

   Get a new guid using SELECT NEWID()

   Place in the Session Object

   for example,

    strGUID = "EDD7CD8E-6AF7-48CF-8901-C1522FC06C0C"
    Session(strGUID)

   Store the guid in either the page viewstate or hidden form field
   Me.ViewState("myGUID") = "EDD7CD8E-6AF7-48CF-8901-C1522FC06C0C"

   Upon postback, retrieve this guid

    strGUID = Me.ViewState("myGUID")

    if Session(strGUID) IS NOTHING then
       reject postback
    else
       allow postback
       delete Session object
       Session(strGUID).Remove
    end if

  
   Not perfect, but it works


Dallas Martin


Quoting sas0riza <[EMAIL PROTECTED]>:

> Hi,
> 
> What is the best way(s) to prevent duplicate or multiple form 
> submission (into database)?  One way is when a user clicks on a button 
> twice or more. Another way is when a user tabs through and 
> accidentally hits enter twice or more.  Another common way is page 
> refreshing.
> 
> Any advice is greatly appreciated.
> 
> Thanks.
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to