Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 23rd, 2011, 03:03 PM
Authorized User
Points: 221, Level: 4
Points: 221, Level: 4 Points: 221, Level: 4 Points: 221, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2010
Posts: 55
Thanks: 9
Thanked 0 Times in 0 Posts
Default Problem with double clicking on the button ranking system

im using vb.net
PHP Code:
 Dim button1 As New Button
            button1
.CssClass "btn"

            
button1.ID rc.Fields.Item(4).Value
            button1
.Text rc.Fields.Item(8).Value.ToString
            button1
.CommandArgument "11"
            
button1.Width 50
            button1
.Height 50

            AddHandler button1
.ClickAddressOf Button2_Click1 
now Button2_Click1 Checks if a cookie exists, if there is updating it if not it creates. If there is subject in cookie then it should skip.
The problem is, if you click full times faster on the button, he just skip and updating the data base so you can fake votes.
PS If I click once, slowly everything works great!

solved!!!!

Last edited by nir987; November 24th, 2011 at 11:41 AM..
  #2 (permalink)  
Old November 23rd, 2011, 08:59 PM
Authorized User
Points: 221, Level: 4
Points: 221, Level: 4 Points: 221, Level: 4 Points: 221, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2010
Posts: 55
Thanks: 9
Thanked 0 Times in 0 Posts
Default

its updatepanel double postback
how do i fix it ? 10 hours on google and still not found the answer....
  #3 (permalink)  
Old November 23rd, 2011, 09:02 PM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Disable the button on the first hit, it will become available on postback
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
  #4 (permalink)  
Old November 23rd, 2011, 09:25 PM
Authorized User
Points: 221, Level: 4
Points: 221, Level: 4 Points: 221, Level: 4 Points: 221, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2010
Posts: 55
Thanks: 9
Thanked 0 Times in 0 Posts
Default

not good .i want the secend click will minus the rating (rating=rating -1)
and its still not good ,becuse i can hit serval time until its disable.
here a simple examle
PHP Code:
Partial Class a
    Inherits System
.Web.UI.Page

    
Protected Sub btnSave_Click(ByVal sender As ObjectByVal e As System.EventArgs)


        
MsgBox("ASDASD")


    
End Sub
End 
Class 
PHP Code:
<%@ Page Language="VBAutoEventWireup="true" CodeFile="a.aspx.vbInherits="a" %>

<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<
html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
    <
title>Untitled Page</title>
</
head>
<
body>
    <
form id="form1" runat="server">
    <
div>
        <
asp:ScriptManager ID="ScriptManager1" runat="server">
        </
asp:ScriptManager>
        <
asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
        <
asp:Button ID="Button1" OnClick="btnSave_Click" runat="server" Text="Button" />
    </
ContentTemplate>
        </
asp:UpdatePanel>
        <
asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
        <
ProgressTemplate>wait</ProgressTemplate>
        </
asp:UpdateProgress>
    </
div>
    </
form>
</
body>
</
html
if i hit 5 times its will open msgbox 5 times
without updatepanel ,its open msgbox 1 time.
sorry about my englishe and the spaming
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Double Clicking The Blank Area of a ListBox southernsun VB How-To 3 December 11th, 2009 10:15 AM
Double clicking control does not add code to Code Behind Paul Walton BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 September 25th, 2009 05:40 PM
Expanding TreeView from double clicking ListView maxl Pro Visual Basic 2005 1 March 5th, 2007 12:54 PM
Running VBScript after clicking a submit button choby VB.NET 1 July 11th, 2006 07:33 PM
Casting System::Object __gc * to System.Double[] nepsat Visual C++ 3 November 19th, 2005 12:51 PM



All times are GMT -4. The time now is 11:52 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.