How to clear FormView data between inserts

I have a formview, and I opened it in Insert mode, where the fields were empty as I expected. Then I entered some data into the fields, but instead of clicking the insert, I clicked the cancel button. Then I put formView into Insert mode again and the previous data was still present.

Can someone tell me how to set it up so that it is cleared if cancel was pressed?

+4
source share
1 answer

Try to do:

this.fvw.DataSource = null; this.fvw.DataBind(); 

This is usually what you do, or use client side scripts.

NTN.

+4
source

Source: https://habr.com/ru/post/1339724/


All Articles