Is there an easy way to reset all the fields in a form?
I have around 100 controls in my asp.net form and there are submit and reset buttons.
How do I make all values in the fields null when user hits reset button?
I have a lot of dropdown boxes, textboxes, checkboxes.
Loop through all of the controls on the page, and if the control is type TextBox, set the Text property to String.Empty
Then to call it in your click event like this: