clear asp controls

i have a aspx page with asp textbox, dropdown controls, i would like it to reset the values, for example clear the user typed value in the text box in a button click event or post back. what would be best way to achieve this?
singsunnAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kiran SonawaneProject LeadCommented:
You have couple of ways to do this either with jquery OR from code behind page
1) Using code behind
  Write function clear_data () which will clear the values and call this function on button click
2) Jquery
   $("#btnSubmit").click(function(){
      // .... clear textbox values
  });
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
singsunnAuthor Commented:
ok. if i were to do it in the code behind, i tried setting txtTextBox1 = string.empty but control retains the value.
0
Kiran SonawaneProject LeadCommented:
try like this
txtTextBox1.Text = "";
0
singsunnAuthor Commented:
yes i meant txtTextBox1.Text
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.