简体   繁体   中英

asp.net - gridview update refresh page and reload data

I have a page with a gridview. When I click on edit and update, the value in the update function reverts to the value before the update. I tried adding if(!IsPostback) to my page_load. Now the data is updated, but after the update, the data is not bound again.

What should I do?

Thank you!

Well... I found my error. My binding function is called BindData(), and I was calling DataBind() by mistake.

Lesson of the day: It's not a good idea to call a function that binds data BindData()

Thank you anyway:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM