OnDataBinding vs Inline: pros, cons and overhead

后端 未结 5 960
深忆病人
深忆病人 2020-12-09 20:08

I thought I would ask this question to see why many examples and people prefer to use inline databinding in the aspx code vs implementing an OnDataBinding event when using W

5条回答
  •  粉色の甜心
    2020-12-09 20:48

    I prefer it your way with OnDataBinding. You can keep your codebehind clean by using a "Databind" region for all the OnDataBinding calls, and you can keep your markup clean by getting those horrible server-side code blocks out of there.

    I think most people do it the inline way because it's easier to understand and to implement.

提交回复
热议问题