473,320 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

counting the click on a picture

hi,
I have user picture on aspx main page, if end-user click it 100 times,
then number_of_clicks will increment to 100.
however, What we do right now is that everytimes a user click on the
picture, application will executes an update statement

" update userhistory set number_of_clicks = number_of_clicks+1 where user_id
=@user_id"
I'm not sure if that's the best way to do this.
note that someone who isn't registered to website can still click on the
picture. I want to minimize the SQL Server traffic. I wonder if there is
way to get around it.

thanks


Nov 19 '05 #1
1 1171
One option to use the onClick client-side event of the image to increment a
JS variable. On postback just pass this JS variable value thru a hidden
input element. On the server-side, get hold of this hidden element and add
it's value to the db.

Of course, you will allow postback (thru a button may be?) only if the user
has logged on.

"Britney" <br**************@yahoo.com> wrote in message
news:uA**************@TK2MSFTNGP15.phx.gbl...
hi,
I have user picture on aspx main page, if end-user click it 100 times,
then number_of_clicks will increment to 100.
however, What we do right now is that everytimes a user click on the
picture, application will executes an update statement

" update userhistory set number_of_clicks = number_of_clicks+1 where user_id
=@user_id"
I'm not sure if that's the best way to do this.
note that someone who isn't registered to website can still click on the
picture. I want to minimize the SQL Server traffic. I wonder if there is
way to get around it.

thanks



Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dave | last post by:
Hello, I've got a situation where a page has a picture on it. This picture is linked to in a newsgroup posting. The owner of the site wants to know how many times the picture is viewed from the...
4
by: serdar c | last post by:
hi everyone, i am writing a program for my scool project and i need to count the number of black pixels in a white empty picture box.. in the old visual basic there was a really simple command...
3
by: ACaunter | last post by:
Hi there, I was wondering how to stop the user from being able to left-click on a picture and being able to save it or anythings... there should be no options of left-clicking a picture how...
3
by: simchajoy2000 | last post by:
Hi, I need to create a vb.net windows program that allows users to create copies of an image when a button is clicked and then allow them to place the image on any point in the user interface. ...
5
by: wxnut | last post by:
In VB 2005 I have six seperately named picture boxes (arranged in a table layout control) in which I plot different X/Y data lines. I would like to be able to right-click on a specific picture box...
4
by: Elton | last post by:
Dear All, I am new to vb , please help. I have a picture , and a picture_click( ) function. What I want to do is to have a simulate a click event onto the picture in a loop. However, when I...
4
by: LyzH | last post by:
Someone else had a question on how to emulate a mouse click. I tried posting in that thread but I have something of a twist on this problem and I'm really in trouble here! If I don't get help...
14
by: raghunadhs | last post by:
HI All! I am developing a V.B application. in this application, user is able to drag and drop a picture(user control) at run time also. for this purpose, i used form's "dragdrop" event....
13
by: sevenz24 | last post by:
So i have my images set up like this : http://cgi.ebay.com/Tippmann-98-paintBall-Marker-Gun-Paint-Ball_W0QQitemZ250274334261QQihZ015QQcategoryZ47248QQssPageNameZWDVWQQrdZ1QQcmdZViewItem Scroll...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.