/// <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" ? "&" : "&"; 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); } } }
/// <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" ? "&" : "&"; 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); } } }