I want to count the number of clicks of buttom

Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2007
Posts: 18
Reputation: apchidara is an unknown quantity at this point 
Solved Threads: 0
apchidara apchidara is offline Offline
Newbie Poster

I want to count the number of clicks of buttom

 
0
  #1
Sep 21st, 2007
hi every one
in my vb.net program I need to keep track if the buttom had been clicked befor or not or how many times it had beed clicked. I cant find the property
can u help me please.
thanks in advanced
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 82
Reputation: preetham.saroja is an unknown quantity at this point 
Solved Threads: 1
preetham.saroja's Avatar
preetham.saroja preetham.saroja is offline Offline
Junior Poster in Training

Re: I want to count the number of clicks of buttom

 
0
  #2
Sep 21st, 2007
try ,using viewstate or cookies to find the number of hits for a particular button in page_load()..
i.e, declare an global variable
and on button_click function ....
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 645
Reputation: binoj_daniel is an unknown quantity at this point 
Solved Threads: 17
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: I want to count the number of clicks of buttom

 
0
  #3
Sep 21st, 2007
Is it a Vb Winform Windows app or a ASP.NET Web app using VB.NET?
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 645
Reputation: binoj_daniel is an unknown quantity at this point 
Solved Threads: 17
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: I want to count the number of clicks of buttom

 
0
  #4
Sep 21st, 2007
'Try this

Dim intBtnClkCount as Integer = 0
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

intBtnClkCount+= 1

MessageBox.Show("Button1 has been clicked" & intBtnClkCount.ToString() & " times.")
End Sub
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 5094 | Replies: 3
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC