+ Start a Discussion
brooksbrooks 

linking visualforce pages . . .

Is it possible to link one Visualforce page (links and buttons) to another? How is that done?
Best Answer chosen by Admin (Salesforce Developers) 
VisualForceVisualForce
Code:
Vf code

<apex:commandButton action="{!Move}" value="Next VF page"/>

controller code:

public PageReference Move()
    {
    PageReference Page = new PageReference('/apex/vfname');
    Page.setRedirect(true);
    return Page;
    }

 
Hope this is help u...

All Answers

brooksbrooks
Ah, that's how you do it, through the Buttons and Links Override, handy.
VisualForceVisualForce
Code:
Vf code

<apex:commandButton action="{!Move}" value="Next VF page"/>

controller code:

public PageReference Move()
    {
    PageReference Page = new PageReference('/apex/vfname');
    Page.setRedirect(true);
    return Page;
    }

 
Hope this is help u...
This was selected as the best answer
brooksbrooks
Thanks VisualForce, appreciate it.
Animesh Sharma 9Animesh Sharma 9
i have also tried this code but it doesn't run
please help me