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
Ghulam ChaudharyGhulam Chaudhary 

How to get values from Force.com site page through URL and display these values on other visualforce page

Hi Everyone,

I have a force.com site page named "my_merchent_c" and this page has two custom fields,one is "Product Listing" and other is "Super Product listing".
I want to get these two fields values from "my_merchent__c" site page through URL and display on "MyPage__c" VF page.

I hope,anyone can help me..

Thanks,
Ghulam
Kanika DuaKanika Dua
Hi Ghulam you can Use page Reference for the same

You can have a button on my_merchant_c 
<apex:commandButton action="{!send}" value="Send Values">
Public PageReference send()
{
PageReference pg = new PageReference('/apex/MyPage__c')
 pg.getParameters().put('ProductListing',ProductListing);
pg.getParameters().put('SuperProductlisting',SuperProductlisting);
  pg.setRedirect(true);
  return pg;
}

Then in Controller of MyPage__c You can get Values like

ProductListing=ApexPages.currentPage().getParameters().get('ProductListing');
SuperProductlisting=ApexPages.currentPage().getParameters().get('SuperProductlisting');