+ Start a Discussion
PhantomPhantom 

Unable to redirect to another page ?????

I have VF page export to CSV or excel file (set content type), i expect after exporting CSV file or excel file, this will redirect to another VF page. But it do not work. So, anyone help me this, pls!

 

It my redirect code:

 

return new Pagereference('/apex/newPage');

 

 

 

SPDSPD

try this.....

 

PageReference pr = new PageReference('/apex/newPage');

pr.setRedirect(true);

 

return pr;

PhantomPhantom
it still not work, in this page i set the contentType: contentType="text/csv#untitle.csv" to export csv file. After exporting file, the page cannot redirect to NewPage. Althrough i try to use PageRedirect('...').