Reputation: 79
what are the possible usage of hiddden field control of VWD in asp.net page
Upvotes: 1
Views: 303
Reputation: 4654
Hidden fields can be used to transfer data back to the server from the front-end and also sending data from server to browser. For e.g. you've written a javascript function that needs to do something if the value of a field is x, then you can always create a hidden field and set its value from server; your javascript can pick the value from this and do whatever it wants to do. It's just like a normal text field, the only difference is that it isn't visible on the page.
Asp.Net internally uses hidden fields to send view state data too. When your .aspx page has been rendered, view its source and you'll see asp.net has automatically created a few hidden fields for its own use.
In Asp.Net architecture it is used as 1 of the 8 (client-side) State Management mechanisms.
Upvotes: 0
Reputation: 1038830
Hidden input fields could be added to a form in order to pass some value when the form is submitted that the user doesn't see and cannot modify using the application interface. They could be useful when you want to persist some values across multiple requests. It's true that in a standard ASP.NET WebForms application their value is quite limited as you already have hidden values holding the View State allowing you to persist values across requests.
Upvotes: 2