You need to sign in to do that
Don't have an account?
ankitha varra
Pagereference is not working in VF page
Vf page <apex:selectList size="1" value="{!selResult}" > <apex:selectOptions value="{! selOptions}" /> </apex:selectlist> <apex:commandButton value="Go!" action="{!movingtoanotherpage}" /> controller Public pagereference movingtoanotherpage(){ if(Selresult=='Create Account'){ PageReference pageRef = new PageReference('/apex/YesBankAccountPage'); Pageref.setredirect(true); return pageRef; } return null; }It is not showing any errors even though pagereference is not working
Try below options
1. Add a system.debug inside movingtoanotherpage method to check the "selresult" value.
2. check if selOptions has 'Create Account' value.
Thanks
Manmohan