selected option doesn't remain after submit

here’s the code in my controller

        public function actionUpdatesubcat()


            $data = subcat::model()->findAll('MAINCATID=:parent_id',



            $data = CHtml::listData($data,'SUBCATID','SUBCAT');

                foreach($data as $key => $value)


                    echo CHtml::tag('option',array('value'=>$key),CHtml::encode($value),true);



and here’s the code in my view





                        $listdata = CHtml::listdata($categories,'MAINCATID','MAINCAT');

                               echo CHtml::dropDownList('MAINCATID', 'MAINCAT', $listdata,










                        <td> <?php echo CHtml::dropDownList('subcatdrop',$subcat,array('empty'=>'--SELECT--'));?></td>


when i select from that drop down listings and then submit the page…the drop down list was like rubber that it goes to the default selected option after the page refresh…how to solve this ?