J
Jonathan Wood
I have a databound dropdownlist control. Based on some other criteria, I
need to specify the selected item in my pages Load event.
The problem is that, in my load event, the control does not yet have any
data. I've found I can call DataBind() on that control and then it works
okay. However, this has me wondering where the control normally databinds,
and if me doing it manually would actually introduce the overhead of having
the control databind twice.
Can anyone answer these questions?
1. Does a control know it's been databound such that it will not repeat the
process unecessarily?
2. Is there a better way to specify the selected value of a control that has
not yet databound?
Thanks!
need to specify the selected item in my pages Load event.
The problem is that, in my load event, the control does not yet have any
data. I've found I can call DataBind() on that control and then it works
okay. However, this has me wondering where the control normally databinds,
and if me doing it manually would actually introduce the overhead of having
the control databind twice.
Can anyone answer these questions?
1. Does a control know it's been databound such that it will not repeat the
process unecessarily?
2. Is there a better way to specify the selected value of a control that has
not yet databound?
Thanks!