---
title: "HiddenField Control 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: "Pushpendra Singh"  
published: 2010-10-19  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/172/hiddenfield-control-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# HiddenField Control in ASP.Net

The HiddenField [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) provides you with a way to store information in the page without displaying it. This control enables a [developer](https://www.mindstick.com/blog/11970/how-to-become-a-successful-blockchain-developer-in-just-six-months) to store a non-displayed value. You can use the [Hidden](https://yourviews.mindstick.com/view/87368/the-mitrokhin-files-the-kgb-s-hidden-hand-in-world-affairs-part-1-infiltration) Field control to store state values. Note, that because the value of a Hidden Field is rendered to the [client](https://www.mindstick.com/articles/23198/3-steps-to-ensure-that-your-client-portal-is-impeccable) [browser](https://www.mindstick.com/articles/323165/top-10-fastest-internet-browsers-in-the-world), 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" />
```

![HiddenField control in ASP.Net](https://www.mindstick.com/mindstickarticle/08f2f90b-71e9-4a31-abf0-5131e3c19f58/images/fae8aed3-c411-410a-967c-dec4a967ba4a.png)

```
<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;}
```

![HiddenField control in ASP.Net](https://www.mindstick.com/mindstickarticle/08f2f90b-71e9-4a31-abf0-5131e3c19f58/images/1578591b-a474-47a1-a6a5-103391341531.png)

Here [Textbox value](https://www.mindstick.com/forum/33830/how-to-calculate-data-grid-value-and-textbox-value-on-change-in-vb-dot-net-winform) will store in Hidden Field and when we click ShowValue [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) then Textbox value is displayed in Label.

---

Original Source: https://www.mindstick.com/articles/172/hiddenfield-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
