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
srikanth001srikanth001 

How to Send values from apex to visualforce and then the same value from visualforce to apex

Hi,

 

   I have a scenario that i want to Send values from apex to visualforce and then the same value   from visualforce to apex means

 

in apex class

 

 pagereference1.getParameters().put('text1',s.name);//pass value 

 and i want how to send the value of  'text1' from visualforce to apex without using commandbutton and commandlink

 

 

 

 

thanks in advance

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox
String text1 = ApexPages.currentPage().getParameters().get('text1');

This will query the current page's parameters for 'text1' and return its value.