I have a datatable with the following fields:
ID, Width, VALUE
I have a form that gets populated dynamically depending on how many times a user clicks the add field button, and when a user does and store all the field information into a datatable and then add the fields at the end when the user hits submit, i want to be
able to take that entire form collection and update my datatable with the value column depending on the ID of the control, and input the value of that control, how can i do that?
I am stuck here with this code, currently i have the following in a datatable:
The value column is currently empty and i am trying to update it
------------------------ ID | Width | Value ------------------------ Size-1| 50 | Test-1| 100 | Size-2| 50 | Test-2| 100 |
I run the following linq query on the datatable and it doesn't seem to get any results or at least if it does, i can't do anything with it.
Session[sectionName] = test; ============================================================================= DataTable dt = (DataTable)Session[sectionName]; var dValue = from rws in dt.AsEnumerable() where rws.Field<string>("ID") == "Size-1"; rws.SetField("Value", Request.Form["Size-1"]);
i want to be able to Update the value field with what comes from the form in that text box control, but it doesn't work at all