3 个回答
/// this is my first vf page custom controllerpublic with sharing class newcustomerandagent { public PageReference saveagent() { insert a; id agentid=a.Id; //this is im storing the id of inserted record. PageReference pageRef = new PageReference('https://c.cs15.visual.force.com/apex/agent_dtail?id='+agentid); // here im passing id through url return pageRef; }}///// this is my second vf page code<apex:page ><apex:pageBlock ><apex:pageBlockSection ><apex:detail subject="{!$CurrentPage.parameters.id}"/>// here im getting the id which i passed from url</apex:pageBlockSection></apex:pageBlock></apex:page>