Maybe collect the data from your rows using JavaScript and obtain a JSON string, which can be put to your hidden field. Then use the System.Text.Json package on client side (added using “Manage NuGet Packages”) to convert the string to objects.
Asp.net : table that i want to collect values from and add to empty input to a form
Daniel
156
Reputation points
I have an asp.net core MVC app which I have a form with some fields in a table.
On the same page, with JavaScript, I generate rows and cells to an existing table that is not in the same as my form.
On post in my form I want to collect the values generated from my javascript code and the other table and pass this along with my post as a new list.
Can I create a hidden input inside my form and for each over the JavaScript populated table? Or should it be done in another way?