Access hidden variables in MVC 3 view

Posted by Samirg under ASP.NET on 10/1/2012 | Points: 10 | Views : 1985 | Status : [Member] | Replies : 0
Hi All,
How can i read the value of hidden variable on my page in MVC 3.
I wrote the following code but it didn't work,

@{ Layout = null;
Session["Temp"] = Convert.ToInt32(Session["Temp"]) + 1;
Session["SecHome"] = Convert.ToInt32(Html.Hidden('hdnVar1').ToString()) + 1;
}

Kindly suggest how can i access 'hdnVar1' here on my view.

Thanks




Responses

(No response found.)

Login to post response