Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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..
 
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....
 
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
======================================
 
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




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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.