I think as per your requirement you don't want to show value on the address bar, so there may be 2 ways: 1. Both VF Page have same controller: If both pages have same controller then we don't need to pass parameters and can access variables.
2. Create Form on Page with method="Post" and use your value to in the input:hidden and as per you requirement and submit form.
Using PageReference in the apex controller class you can able to pass value from one VF page to another as a parameter
First visualforce page controller class
String value = 'Pass value in this variable";
String url = '/apex/VFPageName2?param1=' + value;
PageReference pageRef = new PageReference(url);
pageRef.setRedirect(true);
return pageRef;
I think as per your requirement you don't want to show value on the address bar, so there may be 2 ways: 1. Both VF Page have same controller: If both pages have same controller then we don't need to pass parameters and can access variables.
2. Create Form on Page with method="Post" and use your value to in the input:hidden and as per you requirement and submit form.
1. Both VF Page have same controller:
If both pages have same controller then we don't need to pass parameters and can access variables.
2. Create Form on Page with method="Post" and use your value to in the input:hidden and as per you requirement and submit form.
Thanks
Abdul Vahid
All Answers
First visualforce page controller class
Second visualforce page controller class
1. Both VF Page have same controller:
If both pages have same controller then we don't need to pass parameters and can access variables.
2. Create Form on Page with method="Post" and use your value to in the input:hidden and as per you requirement and submit form.
Thanks
Abdul Vahid
Instead of spending the SOQL via URL, pass a parameter to another page that your controller to perform the query.
I hope this helps.