<html>
<head>
<script language="C#" runat="server">
void Button1_Click(object sender, EventArgs e)
{
if (HiddenField1.Value == String.Empty)
HiddenField1.Value = "0";
//Increment the hidden field value by 1
HiddenField1.Value = (Convert.ToInt32(HiddenField1.Value)+1).ToString();
Label1.Text = HiddenField1.Value;
}
</script>
</head>
<body>
<h3><font face="Verdana">HiddenField</font></h3>
<form runat=server>
<asp:HiddenField id=HiddenField1 runat=Server />
<asp:Button id=Button1 Text="Click Me" onclick="Button1_Click" runat="server" />
Clicked <asp:Label id=Label1 Text="0" runat=server /> times
</form>
</body>
</html>
Monday, 24 June 2013
Using Hidden Field in ASP.NET
Subscribe to:
Post Comments (Atom)
C# LINQ Joins With SQL
There are Different Types of SQL Joins which are used to query data from more than one database tables. In this article, you will learn a...
-
Top 80 + SQL Query Interview Questions and Answers with Examples Interview Questions on SQL are based on following two tables, Employ...
-
There are Different Types of SQL Joins which are used to query data from more than one database tables. In this article, you will learn a...
-
ThreadAbortException Occurs If You Use Response.End, Response.Redirect, or Server.Transfer PRB: ThreadAbortException Occurs If You Use R...
No comments:
Post a Comment