I have an object XMLLog that is retrieved from a database. A form allows a user to edit fields in the object, but because of convoluted reasons, I can't return the modified object, I'm returning a list of Keys in a Post.
I would like to do the following:
//get XMLLog from the database
foreach (var key in Request.Form.AllKeys)
{
XMLLog.key = Request.Form[key];
}
//write XMLLog back to the Database
Is there any way to accomplish that without a giant case statement to test for each possible key?