This may be been asked before (I couldn't locate it), but given the below example. I need to create a url for a custom field, but the case changes. Is there a simple way around this to keep the original VisualForce page text case. I know Apex is case-insensitive, so not sure sure if there is a simple fix for this.
Let's say the page is called TestPage.
PageReference testPage = Page.TestPage; testPage.getParameters().put('param', 'value'); // This will return '/apex/testpage?param=value' as opposed to '/apex/TestPage?param=value' System.debug(testPage.getUrl());