Updating property via code

Please, see this post also Need to add only one channel to a page while creating through code