+ Start a Discussion
N@niN@ni 

Redirect to same page????

Hi,

     I have two visualforce pages ex: page1 and page2,  I am calling page2 from page1,  
page2 genarating csv file after completion that i want to redirect page1 but it is not redirecting even i am calling page1 from page2..


Pratik_MPratik_M
Hi,

Please share the code for page redirection.

Thanks,Pratik
srikanth sfdcsrikanth sfdc
set redirect(true)



Pagereference ref=new Pagereference('/apex/page1');
ref.setRedirect(true);

sarvesh001sarvesh001
Hi N@ni,

For this you have to use same controllers for both pages and   set 

 pg.setRedirect(false)