hello friends,
i have a 4 to 5 textboxes and 2buttons to save and retrieve the values back, after clicking on save button all the textbox values should be saved in xml file,and when i click on retrieve button the values from xml file should be retrieved in listbox or listview.
could someone please help me.....
Loading

VulpesPosted Oct 17, 2014, 6:33 AM
If it's creating an empty XML file then that suggests that the textboxes have not been placed on the form (as the code assumes) but are within some container such as a panel or groupbox.
If that's the case and the textboxes are in (say) panel1, change the code in btnSave_Click as follows:
raju patilPosted Oct 17, 2014, 7:01 AM
raju patilPosted Oct 17, 2014, 7:00 AM
Rajendra TripathyPosted Oct 17, 2014, 6:34 AM
raju patilPosted Oct 17, 2014, 12:52 AM
and while retrieving back the values its showing:
InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.
VulpesPosted Oct 16, 2014, 2:55 PM
// ....
If you're wondering why I'm iterating backwards through the controls collection to retrieve the textbox values, that's because (for some unknown reason) the VS designer adds them to the collection in the reverse order they were added to the form.