Difference between Databound & Databind

Difference between Databound & Databind

I want to know the difference between OnDataBound() & OnDataBinding() in Grid view in Asp.net webforms. When these events are triggered in the Page life cycle.

 

回答

DataBinding is triggered when the grid begins to bind data, but DataBound is triggered when all grid data is bound to the grid. Both of them are custom events of a grid control (or other data-bindable control) and executes in the page life cycle when the control events executes (in stage postback event handling).

 

Control.DataBinding Event

Occurs when the server control binds to a data source.

Remarks

This event notifies the server control to perform any data-binding logic that has been written for it.

 

BaseDataBoundControl.DataBound Event

Occurs after the server control binds to a data source.

Remarks

This event notifies the server control that any data binding logic written for it has completed.

For more information about how to handle events, see Handling and Raising Events.

 

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(20)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2021-08-08 安卓手机无限重启是怎么回事?
2019-08-08 声律启蒙
2019-08-08 HearthBuddy Magnetic 磁力
2019-08-08 margin padding border
2019-08-08 Box Sizing
2019-08-08 box-sizing Bootstrap
2017-08-08 NuGet配置代理
点击右上角即可分享
微信分享提示