Saving control state to persistent medium
Hi All,
I have a following task to be implemented in my project and I would like to know ideas and best possible solution with little code from you guys. Please let me know and any help would be greatly appreciated.
I have a Windows forms with DYNAMIC controls such as dropdown and textbox controls. I want to save the current state of these controls such as value of textbox and selected item of dropdown to a file. So that when I login back and above stated state will be restored on the same form.
In addition to this, I would like not to hard code control names and their properties. Could we use default property of control while accessing state of that control? This is because there are 3 panels with different controls and I do not know which one be active while saving the state of controls on active panel.
I would like to use reflection and Xml serialization for this.
Please let best possible solutions for this task.
Thanks,
Mahesh
|