0

I mean to say when i pass a value from textbox and hit the submit button ..after submission value is still visible in the textbox,why we need to empty the textbox by ourself,why didn't it go away?

Vik Jamwal
  • 1
  • 1
  • 1

1 Answers1

1

Because of PostBacks and ViewState.

Webforms attempt to mimick the way a desktop WinForms application works and handles events. Therefore your page will remember the state of its controls when going to the server and back.

If you need the value changed or reset just manually change it on the event handler in the code-behind.

Community
  • 1
  • 1
Pablo Romeo
  • 11,298
  • 2
  • 30
  • 58