tolninja
asked on
C#
Is there a way to reset a usercontrol so that it is in it's orriginal state? For instance... I have a usercontrol that has textfields, comboboxes, checkboxes, and an assortment of other items that get modified by the user. Once the user clicks the 'submit' button I would like to reload that single control so that all of the fields that were modified are now in their orriginal state. Oh... and this is for a WINDOWS APP. thx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry I dont have code to help but if I could add one extra suggestion to the above and that is to instead of creating all of the constants hard coded, I would instead have Main call a function to store the default values this way changes in the IDE wont get changed by the constants, changes will propegate through.
ASKER
Thanks. I ended up writing a function to loop through every control and set it equal to "" if it was a textfield, label, etc.
ASKER