I have a script in which a LINQ result set exists; I used the following query
var stockDetails = from d in db.BloodBanks
where d.bbUserName == Session["username"].ToString()
select d;
Now I want to use this result set and update the column value. A column is dynamically selected using a string variable.
The code I'm trying to use is:
foreach (BloodBank b in stockDetails)
{
b.<--column name from string variable--> = TextBox1.Text;
}
Please help me find out how I can achieve this.
source
share