// Overriden to convert relative file paths to absolute file paths,
        // due to a redirection issue on UP phones.

        /// <include file='doc\UpWmlMobileTextWriter.uex' path='docs/doc[@for="UpWmlMobileTextWriter.CalculateFormPostBackUrl"]/*' />
        protected override String CalculateFormPostBackUrl(bool externalSubmit, ref bool encode)
        {
            String url = CurrentForm.Action;

            if (externalSubmit && url.Length > 0)
            {
                // Not only do we need to resolve the URL, but we need to make it absolute.
                url    = Page.MakePathAbsolute(CurrentForm.ResolveUrl(url));
                encode = false;
            }
            else
            {
                url    = Page.AbsoluteFilePath;
                encode = true;
            }
            return(url);
        }