In my project i have create dynamic control like text box and call action method on button click.In action method i want to access all values for control which is dynamically created.I have used Request.Form but it will return me null value in my case.So please help me how can i achieve it.
Asked
Active
Viewed 1,064 times
2 Answers
0
When you create your form using @Html.BeginForm
, your action can accept FormCollection collection
. Then, you'll have access to all your form control values.
How can a formcollection be enumerated in ASP.NET MVC?
Just create a Test Controller using the wizard "With Read/Write Actions" and review the Create code. This will show you how it works.