private void RenderPostBackUrl(WmlTextWriter writer, string path)
 {
     if ((String)Browser["requiresAbsolutePostbackUrl"] == "true" && Page != null && Page.Request != null && Page.Response != null)
     {
         // ApplyAppPathModifier makes the path absolute
         writer.WriteEncodedUrl(Page.Response.ApplyAppPathModifier(path));
     }
     else
     {
         writer.WriteEncodedUrl(path);
     }
 }
        private void RenderGoActionToPostbackCard(WmlTextWriter writer, String target, String argument, String postUrl)
        {
            // If using postback cards, render a go action to the given
            // postback card, along with setvars setting the target and
            // argument.
            writer.WriteBeginTag("go");
            writer.Write(" href=\"");
            _writtenPostBack = true;
            writer.Write("#");
            writer.Write(WmlTextWriter.PostBackWithVarsCardID);
            writer.Write("\">");
            writer.WriteBeginTag("setvar");
            writer.WriteAttribute("name", _postBackEventTargetVarName);
            writer.WriteAttribute("value", target);
            writer.Write("/>");
            writer.WriteBeginTag("setvar");
            writer.WriteAttribute("name", _postBackEventArgumentVarName);
            writer.Write(" value=\"");
            if (argument != null)
            {
                writer.WriteEncodedText(argument);
            }
            writer.Write("\"/>");

            if (!String.IsNullOrEmpty(postUrl))
            {
                writer.WriteBeginTag("setvar");
                writer.WriteAttribute("name", _postUrlVarName);
                writer.Write(" value=\"");
                writer.WriteEncodedUrl(postUrl);
                writer.Write("\"/>");
            }

            writer.WriteEndTag("go");
        }
Ejemplo n.º 3
0
 private void RenderPostBackUrl(WmlTextWriter writer, string path) {
     if ((String)Browser["requiresAbsolutePostbackUrl"] == "true" && Page != null && Page.Request != null && Page.Response != null) {
         // ApplyAppPathModifier makes the path absolute
         writer.WriteEncodedUrl(Page.Response.ApplyAppPathModifier(path));
     }
     else {
         writer.WriteEncodedUrl(path);
     }
 }
Ejemplo n.º 4
0
        private void RenderGoActionToPostbackCard(WmlTextWriter writer, String target, String argument, String postUrl) {
            // If using postback cards, render a go action to the given
            // postback card, along with setvars setting the target and
            // argument.
            writer.WriteBeginTag("go");
            writer.Write(" href=\"");
            _writtenPostBack = true;
            writer.Write("#");
            writer.Write(WmlTextWriter.PostBackWithVarsCardID);
            writer.Write("\">");
            writer.WriteBeginTag("setvar");
            writer.WriteAttribute("name", _postBackEventTargetVarName);
            writer.WriteAttribute("value", target);
            writer.Write("/>");
            writer.WriteBeginTag("setvar");
            writer.WriteAttribute("name", _postBackEventArgumentVarName);
            writer.Write(" value=\"");
            if (argument != null) {
                writer.WriteEncodedText(argument);
            }
            writer.Write("\"/>");

            if (!String.IsNullOrEmpty(postUrl)) {
                writer.WriteBeginTag("setvar");
                writer.WriteAttribute("name", _postUrlVarName);
                writer.Write(" value=\"");
                writer.WriteEncodedUrl(postUrl);
                writer.Write("\"/>");
            }

            writer.WriteEndTag("go");
        }