Using data binding syntax can be tricky. Normally you use that syntax in a control that will be explicitly bound by calling the .DataBind() method. However, you are trying to use this at the page level. Unless you bind the page, that databinding code will never be processed. What's wrong with letting the code behind do it?
One bit of advice for something like this... create a public method on the control to act as a "setter" for this value you need to pass it. Have that method fire off the code that needs the value. (I'm assuming that you are running the code that needs that value in the control's page_load event, which is why you have to put the value assignment in the OnInit handler of the page.) This provides more flexibility to the control and reduces (if not eliminates) the load order dependency on the control's behavior.
-
Peter