function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shahab KhanShahab Khan 

How to redirect to the same page

Hi,

I have develop visual force page and getting it with my force.com site.
here is the pyblic link
http://adamscenter.force.com/volunteers/MemberSignup

I want when user submit the form it should return to the same page/form.
Can anybody help me how can i do that?
Thanks in advance

bob_buzzardbob_buzzard
If you are using a custom/extension controller, you can just clear out the properties and return null from your action method handling the form submission - that will leave the user on the same page.  Otherwise you can access the current URL from ApexPages.CurrentPage().getUrl();
Shahab KhanShahab Khan
Hi Bob,

Thank you very much for your reply, i am using standard controller "contact" in that case how can i do that
bob_buzzardbob_buzzard
You can't do this with a standard controller - that will send you to the detail page.  You'll need to write at least an extension controller.
Shahab KhanShahab Khan
I have also written the extension controller but still it redirecting to the detail page.