function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rupesh ranjanrupesh ranjan 

How to get value from one Visual force tab to second Visual force tab???

How to get value from one Visual force tab to second Visual force tab???
Best Answer chosen by rupesh ranjan
suresh sanneboina 4suresh sanneboina 4
Please try the below code
<apex:page controller="AccController">
    <apex:form >
  <apex:commandButton action="{!navigatetopage}" value="Navigate"/>
  </apex:form>
</apex:page>
 
public class AccController {

    public PageReference navigatetopage() {
        PageReference pg=new PageReference('/apex/page1?name='+'sample'+'key=value');
        pg.setRedirect(true);
        return pg;
    }

}

 

All Answers

suresh sanneboina 4suresh sanneboina 4
Please try the below code
<apex:page controller="AccController">
    <apex:form >
  <apex:commandButton action="{!navigatetopage}" value="Navigate"/>
  </apex:form>
</apex:page>
 
public class AccController {

    public PageReference navigatetopage() {
        PageReference pg=new PageReference('/apex/page1?name='+'sample'+'key=value');
        pg.setRedirect(true);
        return pg;
    }

}

 
This was selected as the best answer
rupesh ranjanrupesh ranjan
this is redirect from one page to another i am talking about one tab to another with value..