The 2 ways of passing parameters to another page that i know of are
Use the pageReference class and use its getParameter method to assign parameters
pageReference pr = Page.page1; pr.getParameters().put('param1',param);
Build a url using string and pass it to pagereference class
String url = '/apex/page1?param1=param pr = new PageReference(url);pr.setRedirect(true);
Are there anyother way we can pass params? What are differences in terms of best practice or performance or security
Or are they just the same?