In controller:
Yii::app()->user->setFlash( 'Message00', //a string for key usage 'This is msg from controller.' );
In view:
if(Yii::app()->user->hasFlash('Message00')){ echo '<div class="flash-success">'; echo Yii::app()->user->getFlash('Message00'); echo '</div>';
}