hi all of u
i need the code for this one
counting the button clicks in one minute ,,that code should be c#.net
and timer is also included for time setting........count the button clicks in one minute
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dorababu MekaPosted May 31, 2011, 9:41 AM
I modified time interval for 10 seconds
Dorababu MekaPosted May 31, 2011, 9:37 AM
bhanu prasannakumarPosted May 31, 2011, 9:33 AM
Dorababu MekaPosted May 31, 2011, 9:31 AM
Count each and every button click and store
After one minute you have to show how many times you have clicked the button and want to show right
bhanu prasannakumarPosted May 31, 2011, 9:29 AM
Sandeep ShekhawatPosted May 31, 2011, 9:27 AM
protected void Button_Click(object sender, EventArgs e)
{
btncount+=1; //every click event value increment
}
//Timer is
Timer Tick Event
int time=0;
Try This it will be helpful.
But Remember some point:
1.Value type variable always intiliazed.
2.Ajax Extensions Controls Like Timer,Update panel uses with Script Manager.
Dorababu MekaPosted May 31, 2011, 9:26 AM
bhanu prasannakumarPosted May 31, 2011, 9:24 AM
Dorababu MekaPosted May 31, 2011, 9:20 AM
protected void Timer1_Tick(object sender, EventArgs e)
{
Response.Write("Total Count:{0}'"+click+"'");
click=0;
}
Dorababu MekaPosted May 31, 2011, 9:15 AM
bhanu prasannakumarPosted May 31, 2011, 9:14 AM
Dorababu MekaPosted May 31, 2011, 9:12 AM
bhanu prasannakumarPosted May 31, 2011, 9:11 AM
bhanu prasannakumarPosted May 31, 2011, 9:10 AM
Dorababu MekaPosted May 31, 2011, 9:05 AM
Static int click=0;
protected void Button1_Click(object sender, EventArgs e)
{
click++;
TextBox1.Text = click.ToString();
}
protected void Timer1_Tick(object sender, EventArgs e)
{
Response.Write("Total Count:{0}'"+click+"'");
}
bhanu prasannakumarPosted May 31, 2011, 9:04 AM
Dorababu MekaPosted May 31, 2011, 9:03 AM
bhanu prasannakumarPosted May 31, 2011, 8:58 AM
bhanu prasannakumarPosted May 31, 2011, 8:56 AM
bhanu prasannakumarPosted May 31, 2011, 8:49 AM
Dorababu MekaPosted May 31, 2011, 8:49 AM
bhanu prasannakumarPosted May 31, 2011, 8:47 AM
Dorababu MekaPosted May 31, 2011, 8:44 AM
bhanu prasannakumarPosted May 31, 2011, 8:43 AM
Dorababu MekaPosted May 31, 2011, 8:41 AM
bhanu prasannakumarPosted May 31, 2011, 8:39 AM
Sandeep ShekhawatPosted May 31, 2011, 8:30 AM
protected void Button_Click(object sender, EventArgs e)
{
btncount+=1; //every click event value increment
}
//Timer is
Timer Tick Event
Dorababu MekaPosted May 31, 2011, 8:19 AM
bhanu prasannakumarPosted May 31, 2011, 8:18 AM
Dorababu MekaPosted May 31, 2011, 8:14 AM
Don't forgot to set Timer interval to 60000 if you are doing on your own
Jaganathan BantheswaranPosted May 31, 2011, 7:54 AM
Have a global variable "clickCount".
Start the timer.
Increment clickCount in On mouse click event.
if timer reaches 1 min then stop it and display the clickCount.
Reset clickCount to 0.
Start the timer...
...
...