Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Binding controls on PreRender

I have been led to believe that the best point to bind your controls is the PreRender. As all the controls are ready and this is the last stage before rendering etc. Is this correct or should controls be bound at a different point?

Many Thanks

Louis

like image 212
Funky Avatar asked Dec 17 '10 10:12

Funky


1 Answers

I agree with binding at PreRender.
Refer to the life cycle. As you can see, PreRender occurs after the control events (such as clicking), which is essential when having to rebind new/modified data after the users submits the form with a click of some sort.

But if you do not have to do binding based on user interactivity, then for the most part the place you put is irrelevant.

Make no mistake, though, depending on your logic, some bindings may have to occur before the control events for them to interact with the bound data.

like image 69
BeemerGuy Avatar answered Oct 19 '22 22:10

BeemerGuy