views:

274

answers:

1

I would love to use hidden field value but I think I am missing something to do. Since every page refresh or staying a little bir longer on the page, the value is missing.

http://stackoverflow.com/questions/1283650/asp-net-mvc-make-session-entirely-cookie-less-hidden-form-field ? how can i do the this cookiles suff above...?

I use hidden value to keep the url to redirect to next page. May be i sould not keen on using hidden value, session variables are better?

Advices please. Regards

A: 

If you want to keep something across the page refresh, you need to use a server side control with ViewState enabled. You have not made it clear whether for hidden fields, you are using any server side control or plain old html control. With html control, you shall have to manage the show for yourself.

Kangkan
server side control. after enabling viewstate what else should i do to have perfect work from the hidden varibleregards, bk
blgnklc
Then you can access the property of the service control on the postback the way one may use the properties of any other server controls. In the classic ASP context, we used to put the value property of hidden textboxes and accessed it whenever required on the server side. So that behaviour will still be available.
Kangkan