You need to sign in to do that
Don't have an account?
James_Dean
PageReference not working at all
This is my simple page and controller but it does not work at all........every time i click the submit button it refreshes the current page
---Page-----
<apex:page controller="MyController" tabStyle="Contact">
<apex:form >
<apex:form >
<apex:pageBlock>
<apex:commandButton action="{!submit}" value="Export" id="BtnExport"/>
</apex:pageBlock>
</apex:pageBlock>
</apex:form>
</apex:page>
</apex:page>
---Controller-----
public class MyController {
public PageReference submit() {
PageReference secondPage= new PageReference('www.google.com');
secondPage.setRedirect(true);
return secondPage;
}
PageReference secondPage= new PageReference('www.google.com');
secondPage.setRedirect(true);
return secondPage;
}
}
try this its definitely works
and its working while changing http://www.google.com
i m wondering if u have another code with this so u may be stuck with other issues
please put all code
Message Edited by amar joshi on 09-30-2008 02:53 PM