You need to sign in to do that
Don't have an account?

Visualforce pages
I have created a custom web to case form. on click of submit button a case record is created in the org and user is redirected to a thanks page. I want to display the case number of the created case on that thanks page. Both the pages have different controllers. Can anyone tell what to do for that?
The short answer is "no" sadly - there is no way to get the Case ID back in a web-to-case submission, it is a fire and forget form submission from your web-to-case to the salesforce servers, which makes a case.
What you can do is include the Case ID in the email-template you provide as a "thanks for contacting support" email? So on your thank you page, could you invite the user to check their e-mails for the case ID?
If you have done something weird like including the web-to-case form on a visualforce page, and the thank you page on visualforce (using sites.com maybe?) then there probably is a solution, but there is probably also some other problems :D
If you are using visualforce, you know you can just use the case standardcontroller/apex:form to create a case and then just do a normal save/rerender to display thanks and the case ID to a user?
if you have a VF page with the web-to-case HTML on, I think you have buried yourself in a pickle regarding returning the case ID for the thank you page, because the form on the page will fire the case information all the way OUT of your salesforce Org to the standard Salesforce web-to-case endpoint, where it will then be filtered back in to your org?! See why it's weird... I would just write a standard Visualforce page for case creation - unless there is a specific reason you are using web-to-case.