What is hidden field control?

 Posted by Tripati_tutu on 10/15/2010 | Category: ASP.NET Interview questions | Views: 3732 | Points: 40

Hidden fields technique is widely used in ASP.NET programming. This control enables a developer to store a non-displayed value in the rendered HTML of the page. The HiddenField control is used to store a value that needs to be persisted across multiple postbacks to the server. Hidden fields are html input control with hidden type that store hidden data in the html. An example for a hidden field can look like this in your Web Page as:

<asp:HiddenField ID="MyHiddenField" runat="server" Value=”Hidden field value”/>

It will be hidden to the user that means you can store some value but user cannot able to see that value in a webpage. But you should not keep any sensitive information in hidden field because it is available in a webpage, but user cannot see it directly. You can see the hidden field value by right click on a web page and go to "View Source". There you can see the hidden field value along with html tag available in a web page, so it is not secure.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response