Pages

Ads 468x60px

For New Update Use this Link http://dotnethubs.blogspot.in/ Offer for you

.

Showing posts with label Count the number of times a submit button has been clicked. Show all posts
Showing posts with label Count the number of times a submit button has been clicked. Show all posts

Monday 1 April 2013

Count the number of times a submit button has been clicked

Count the number of times a submit button has been clicked

Count the number of times a submit button has been clicked

Introduction
  How i can find the user click on submit button in multipal time

GUI Html Code As Shown Below

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="counter.aspx.cs" Inherits="counter" %>

<!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></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
  
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click"
            Text="counter" />
&nbsp; Show Total Click of Particular User
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
  
    </div>
    </form>
</body>
</html>

From Image as shown below
On Button Click Couter Code Behind 
static int count = 0; 
protected void Button1_Click(object sender, EventArgs e)
    {
        count++;
        int totalcount = count;
        TextBox1.Text = totalcount.ToString();
    }

Output as shown below

Download sample code attached







 

..




New Updates

Related Posts Plugin for WordPress, Blogger...

Related Result