KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a database object (a row), that has lots of properties (columns) that map to form fields (asp:textbox, asp:dropdownlist etc) . I would like to transform this object and properties into a dictionary map to make it easier to iterate. Example: Dictionary<string, string> FD = new Dictionary<string,string>(); FD["name"] = data.name; FD["age"] = data.age; FD["occupation"] = data.occupation; FD["email"] = data.email; .......... How would I do this easily, without manually typing out all the various 100s of properties? Note: FD dictionary indices are same as database column names.
Tags (comma-separated)
Save Edits
Cancel