Forum Replies Created

  • If you are using same controller for both visualforce pages then you can assign those values to variables. You can use those variables in next visualforce page. In below code we are selecting option in first page and passing it to controller and using it in second page.

    First Page and its Controller:

    `



    Select the value to pass:













    public class Sample
    {
    public String option {get;set;}

    public pageReference pass()
    {
    PageReference pg = new PageReference('/apex/SecondPage');
    pg.setRedirect(true);
    return pg;
    }
    }`

    Second Page:

    `
    The received value is {!option}
    `

Popular Salesforce Blogs

Popular Salesforce Videos