I’m using an asp.net MultiView control with 2 Views inside.
First view has a “create” button to create new customer. Clicking the “create” button will display the 2nd View of the MultiView which allows to enter customer information.
Second view has a “return” button to return back to the 1st view.
The problem is: after creating the first customer, clicking the “create” button again will render the 2nd view with first customer’s information already entered.
Is there a way to reset 2nd view to its default state whenever the “create” button is clicked?
Perhaps, clearing out the viewstate?
Currently I’m using a recursive method to clear out all the inputs (textbox, radiobutton, dropdownlist, etc.). I just want to know if there’s a cleaner/better way.
Thanks
Easiest way to do it is to have the return button do a response.redirect to the same page. It won’t be terribly inefficient and you won’t wave to manually reset anything.