/// <include file='doc\XhtmlBasicPageAdapter.uex' path='docs/doc[@for="XhtmlPageAdapter.RenderUrlPostBackEvent"]/*' />
        public virtual void RenderUrlPostBackEvent(XhtmlMobileTextWriter writer,
                                                   String target,
                                                   String argument)
        {
            String amp = (String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] == "false"  ? "&" : "&amp;";

            if ((String)Device["requiresAbsolutePostbackUrl"] == "true")
            {
                writer.WriteEncodedUrl(Page.AbsoluteFilePath);
            }
            else
            {
                writer.WriteEncodedUrl(Page.RelativeFilePath);
            }
            writer.Write("?");

            // Encode ViewStateID=.....&__ET=controlid&__EA=value in URL
            // Note: the encoding needs to be agreed with the page
            // adapter which handles the post back info
            String pageState = Page.ClientViewState;

            if (pageState != null)
            {
                writer.WriteUrlParameter(MobilePage.ViewStateID, pageState);
                writer.Write(amp);
            }
            writer.WriteUrlParameter(EventSourceKey, target);
            writer.Write(amp);
            writer.WriteUrlParameter(EventArgumentKey, argument);
            RenderHiddenVariablesInUrl(writer);

            // Unique file path suffix is used for identify if query
            // string text is present.  Corresponding code needs to agree
            // on this.  Even if the query string is empty, we still need
            // to output the suffix to indicate this. (this corresponds
            // to the code that handles the postback)
            writer.Write(amp);
            writer.Write(Constants.UniqueFilePathSuffixVariable);

            String queryStringText = PreprocessQueryString(Page.QueryStringText);

            if (queryStringText != null && queryStringText.Length > 0)
            {
                writer.Write(amp);
                if ((String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] != "false")
                {
                    writer.WriteEncodedAttributeValue(queryStringText);
                }
                else
                {
                    writer.Write(queryStringText);
                }
            }
        }
        private void RenderAbsolutePostbackUrl(XhtmlMobileTextWriter writer)
        {
            String url = PreprocessQueryString(Control.Action);

            if (url.Length > 0)
            {
                // Not only do we need to resolve the URL, but we need to make it absolute.
                url = Page.MakePathAbsolute(Control.ResolveUrl(url));
                writer.Write(url);
            }
            else
            {
                writer.WriteEncodedUrl(Page.AbsoluteFilePath);
            }
        }
 private void RenderPostbackUrl(XhtmlMobileTextWriter writer)
 {
     if ((String)Device["requiresAbsolutePostbackUrl"] == "true")
     {
         RenderAbsolutePostbackUrl(writer);
         return;
     }
     if (Control.Action.Length > 0)
     {
         String url = Control.ResolveUrl(PreprocessQueryString(Control.Action));
         writer.Write(url);
     }
     else
     {
         writer.WriteEncodedUrl(Page.RelativeFilePath);
     }
 }
 private void RenderAbsolutePostbackUrl(XhtmlMobileTextWriter writer) {
     String url = PreprocessQueryString(Control.Action);
     if (url.Length > 0) {
         // Not only do we need to resolve the URL, but we need to make it absolute.
         url = Page.MakePathAbsolute(Control.ResolveUrl(url));
         writer.Write(url);
     }
     else {
         writer.WriteEncodedUrl(Page.AbsoluteFilePath);
     }
 }
 private void RenderPostbackUrl(XhtmlMobileTextWriter writer) {
     if ((String)Device["requiresAbsolutePostbackUrl"] == "true") {
         RenderAbsolutePostbackUrl (writer);
         return;
     }
     if (Control.Action.Length > 0) {
         String url = Control.ResolveUrl(PreprocessQueryString(Control.Action));
         writer.Write(url);
     }
     else {
         writer.WriteEncodedUrl(Page.RelativeFilePath);
     }
 }
        /// <include file='doc\XhtmlBasicPageAdapter.uex' path='docs/doc[@for="XhtmlPageAdapter.RenderUrlPostBackEvent"]/*' />
        public virtual void RenderUrlPostBackEvent (XhtmlMobileTextWriter writer,
            String target, 
            String argument) {

            String amp = (String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] == "false"  ? "&" : "&amp;";
            
            if ((String)Device["requiresAbsolutePostbackUrl"] == "true") {
                writer.WriteEncodedUrl(Page.AbsoluteFilePath);
            }
            else {
                writer.WriteEncodedUrl(Page.RelativeFilePath);
            }
            writer.Write ("?");

            // Encode ViewStateID=.....&__ET=controlid&__EA=value in URL
            // Note: the encoding needs to be agreed with the page
            // adapter which handles the post back info
            String pageState = Page.ClientViewState;
            if (pageState != null) {
                writer.WriteUrlParameter (MobilePage.ViewStateID, pageState);
                writer.Write (amp);
            }
            writer.WriteUrlParameter (EventSourceKey, target);
            writer.Write (amp);
            writer.WriteUrlParameter (EventArgumentKey, argument);
            RenderHiddenVariablesInUrl (writer);

            // Unique file path suffix is used for identify if query
            // string text is present.  Corresponding code needs to agree
            // on this.  Even if the query string is empty, we still need
            // to output the suffix to indicate this. (this corresponds
            // to the code that handles the postback)
            writer.Write(amp);
            writer.Write(Constants.UniqueFilePathSuffixVariable);

            String queryStringText = PreprocessQueryString(Page.QueryStringText);

            if (queryStringText != null && queryStringText.Length > 0) {
                writer.Write (amp);
                if ((String)Device[XhtmlConstants.SupportsUrlAttributeEncoding] != "false") {
                    writer.WriteEncodedAttributeValue(queryStringText);
                }
                else {
                    writer.Write (queryStringText);
                }
            }
        }