What the differences between page.databind and control.databind?
All I have use in my applications to bind the datagrid is the control.databind. I have research page.databind online but I still don't understand it.
Can someone explain to me what is the purpose of page.databind? Also, is there a performance difference?
Re: What the differences between page.databind and control.databind?
It binds a data source to the invoked server control and all its child controls. I would assume it does have a performance gain but I didnt find anything on that.
Re: What the differences between page.databind and control.databind?
This is the part I don't understand, which also I got from my research of other website: It binds a data source to the invoked server control and all its child controls. I still don't know what's the purpose of it. :confused:
Re: What the differences between page.databind and control.databind?
Multiple bindings at once vs. explicitly binding each control one at a time.
Re: What the differences between page.databind and control.databind?
Page.DataBind is the same thing as Control.DataBind, with less code, and UNNOTICEABLY lower performance (since it needs to loop through the controls' collection)
Re: What the differences between page.databind and control.databind?
I see I assumed wrong with the performance point.
Re: What the differences between page.databind and control.databind?
Even Yoda learns new things once in a while ;)
Re: What the differences between page.databind and control.databind?
Yes, and I am never too humble to admit it either :D
Btw, then the Page.DataBind is the lazy programmers way to bind the controls vs the hard core programmer using the Control.DataBind.