---
title: "HiddenField in ASP.NET"  
description: "The HiddenField control provides you with a way to store information in the page without displaying it. This control enables a developer to store a no"  
author: "Uttam Misra"  
published: 2010-10-30  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/35/hiddenfield-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# HiddenField in ASP.NET

The HiddenField [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) provides you with a way to [store](https://www.mindstick.com/articles/13125/tips-to-increase-sales-of-your-woocommerce-store) information in the page without displaying it. This control enables a [developer](https://www.mindstick.com/articles/157260/variation-between-web-designer-and-web-developer) to store a non-displayed [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages). You can use the [Hidden](https://www.mindstick.com/forum/2303/skip-validating-field-from-hidden-div) [Field](https://www.mindstick.com/forum/160867/does-mindstick-provide-training-for-field-marketing) control to store state values. Note that because the value of a Hidden Field is rendered to the [client](https://www.mindstick.com/articles/12905/fynsis-announce-suitecrm-customer-portal-independent-client-service-platform) [browser](https://www.mindstick.com/blog/155254/which-is-the-best-internet-browser), it is not suitable for storing [security](https://www.mindstick.com/articles/43813/new-security-technologies)-[sensitive](https://answers.mindstick.com/qa/34778/recently-heard-about-ultra-sensitive-electronic-skins-what-is-it) values.

```
 <asp:HiddenField ID="HiddenField1" runat="server" /> <asp:HiddenField ID="HiddenField1" runat="server" />  <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>  <asp:Label ID="Label1" runat="server"></asp:Label>  <asp:Button ID="Button1" runat="server" OnClick="Button1_Click"     Text="Button" />  protected void Page_Load(object sender, EventArgs e)     {         HiddenField1.Value = TextBox1.Text;            }         protected void Button1_Click(object sender, EventArgs e)     {         Label1.Text = HiddenField1.Value;     }
```

---

Original Source: https://www.mindstick.com/blog/35/hiddenfield-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
