Can u Tell me Use of the Hidden fiels in asp.net

Posted by Madhuri123 under ASP.NET on 6/4/2011 | Points: 10 | Views : 2796 | Status : [Member] | Replies : 8
Can u Tell me Use of the Hidden fiels in asp.net





Thanks InAdvance
T.Madhuri




Responses

Posted by: Jayakumars on: 6/4/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this
server side

protected void Page_Load(object sender, EventArgs e)
{
hnd1.Value = "Jayakumar";
}

Client Side

<asp:HiddenField ID="hnd1" runat ="server" />


Mark as Answer if its helpful to you

Madhuri123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 6/4/2011 [Member] Bronze | Points: 25

Up
0
Down
hi....
please chk the following link:-

http://dotnet.dzone.com/news/aspnet-client-side-state-manag-0

Thanks and Regards
Akiii

Madhuri123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Susanthampy on: 6/4/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi,


Refer this

http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx

Regards,
Susan

Madhuri123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksingh on: 6/5/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Hidden field is client side state management technique in asp.net. As you know asp.net pages are state less that means whenever round trip happens all the page data get lost. To retain the page data during postback we use state management and Hidden Field is one of client side technique.

A HiddenField control stores a single variable in its Value property and must be explicitly added to the page.

In order for hidden-field values to be available during page processing, you must submit the page using an HTTP POST command. If you use hidden fields and a page is processed in response to a link or an HTTP GET command, the hidden fields will not be available.

Note : Do not store sensitive information in hidden field.

For more information :
please refer : http://wiki.asp.net/page.aspx/298/hiddenfield/





Regards,
Sunil

Madhuri123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakn2 on: 6/6/2011 [Member] Starter | Points: 25

Up
0
Down
to maintain state between two pages we can use hidden fields. if security is not concerned hidden fields are best option to store previous page values in state management.

Normally also every control value is stored in hidden fields by default. but we do n't know we are thinking that we are going previous page values how these values are saving etc .

Thanks&Regards
LakshmiNarayana Nalluri.

Madhuri123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 6/6/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi, i think in asp.net 2.0 above, "viewstate" is already enabled by default !

correct me if i am wrong !

Regards
Akiii

Madhuri123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakn2 on: 6/6/2011 [Member] Starter | Points: 25

Up
0
Down
ya you are correct but what i am saying is all controls values in page are stored hiddend filed without knowing us. if you want more clarification refer in google.

Thanks&Regards
LakshmiNarayana Nalluri.

Madhuri123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 6/6/2011 [Member] Bronze | Points: 25

Up
0
Down
hi LakshmiNarayana ....

Thanks for ur answer...

Regards
Akiii

Madhuri123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response