Link to home
Start Free TrialLog in
Avatar of tolninja
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
Avatar of Bill-Hanson
Bill-Hanson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tolninja
tolninja

ASKER

Thanks for the quick reply.  That's what I figured... I'm going to leave the question open for a little while longer just incase someone has a better solution.  thx
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Thanks.  I ended up writing a function to loop through every control and set it equal to "" if it was a textfield, label, etc.