View Single Post
  #1 (permalink)  
Old July 15th, 2009, 12:43 AM
lionac lionac is offline
Registered User
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page Listing 5-9 page 102-103

Dr. Khosravi -
I am wondering about this CreateContainerChildControls method:
is it better to create controls in this method and add them to Controls collection or like you wrote looks that that controls should be declared somewhere else?

Example :
You write :
case ContainerType.PaymentMethodLabel:\
paymentMethodLabel = new Label();
paymentMethodLabel.Width = Unit.Percentage(100)
Did you think:
Label paymentMethodLabel = new Label();
and then :

And if you can explain which option is better and why please.