开发者

How to clear FormView data between inserts

I have a formview and I opened it in Insert mode where the fields开发者_开发百科 were all blank as I expected. I then entered some data into the fields but instead of clicking insert I clicked cancel. I then entered the formView in Insert mode again and the previous data was still present.

Can someone please tell me how to set it up so it will be cleared if cancel was pressed?


Try doing:

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

Is typically what you do, or use client-side scripting.

HTH.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜