Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HOw to find value of hidden field from formcollection in controller

I am using a hidden field in my view which is saving some value of active tab index Now I want the value of hidden field in my controller I m using a submit button to submit.

 public ActionResult Index(FormCollection frm)
    {     var value = frm["HiddenName"];
 }

I m submitting form and using FormCollection to fetch values but when It comes to find value of hidden field I always gives me blank value, I have checked using page source code It has some value in it

like image 524
Aman Rohilla Avatar asked Dec 17 '22 12:12

Aman Rohilla


1 Answers

Does the input tag have a name attribute and is it located within the form?

like image 76
ZippyV Avatar answered May 19 '23 21:05

ZippyV