hidden field Control
what is the use of hidden field control
can any one explain to me
thanks in advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vijaya KadiyalaPosted Mar 13, 2009, 2:04 PM
Hi
This control enables a developer to store a non-displayed value.
When we need to persist some value during the posts to server, we can use the hidden fields. It renders a element in the HTML. We normally use the view state to store these values. But for some reason, if the view state is not available, then we can use HiddenField Control to store these values. Although this is not visible to the user in the browser, but the HiddenField is rendered in the client browser. Hence it is not suitable storing values, which are security sensitive.
We have to use the value Property of the HiddenField to specify the value. We can also use the event handler for the change of value, which is raised when the value of the Hidden field is changed between posts, to do some work when the value of the hidden field has changed during post back.
http://www.vikramlakhotia.com/Using_The_Hidden_Control.aspx
Thanks -- Vijaya Kadiyala
http://dotnetvj.blogspot.com
Vyankatesh SuryawanshiPosted Mar 19, 2009, 7:23 AM
The Hidden object represents a hidden input field in an HTML form.
For each instance of an tag in an HTML form, a Hidden object is created.
You can access a hidden input field by searching through the elements[] array of the form, or by using document.getElementById("hid1").
Here is a syntax to maipulate hidden fields at client side.
var objHid1 = document.getElementById("hid1").;
objHid1.value=xyz;
ArshadPosted Mar 13, 2009, 5:51 AM
thought the hidden field we can use the client side Information in the Server Side easily. eg: like deleting some record from the DataGrid, we can take that deleting record information in hidden filed through the JavaScript, and after that we can use that Value at the code behind.
ViewState also use the HiddenField Control but ViewState keeps the value in the Encrypted form inside the HiddenField. I hope you got it, what i am trying to say.
Thanks