Hiddenfield

Hidden field value  can be used to set the values to postback to server each time .

ASP.NET allows you to store information in a HiddenField control, which renders as a standard HTML hidden field. A hidden field does not render visibly in the browser, but you can set its properties just as you can with a standard control. When a page is submitted to the server, the content of a hidden field is sent in the HTTP form collection along with the values of other controls.

<asp:HiddenField ID=”hiddeFieldValue” runat=”Server”  />

<asp:Button ID="Button1" runat="Server" OnClick="Button1_Click" Text="send" />
code behind 

 protected void Button_Click(object sender, EventArgs e)
            {
               if(hiddenFieldVlaue.value=null)
hiddenFieldValue.value=0;
            }
Advertisements