i want to find count of number of times button is clicked.
if i click the button 10 times, it have to print 10.
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.
Sanjeeb LenkaPosted Sep 11, 2013, 3:51 AM
if you want to do it in using java then . you have to use servlet or jsp.
Mark it as answered if it helps you.
Manj NPosted Sep 11, 2013, 3:31 AM
Sanjeeb LenkaPosted Sep 11, 2013, 3:28 AM
try this by using javascript:
Manj NPosted Sep 11, 2013, 3:19 AM
Sanjeeb LenkaPosted Sep 11, 2013, 3:15 AM
try this:
in aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
in .cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
static int i = 0;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
i++;
Label1.Text = "Count :" + i;
}
}