public virtual void RenderSelectOptionAsPostBack(WmlTextWriter writer, string text, String target, String argument)
        {
            if (writer.AnalyzeMode)
            {
                return;
            }

            writer.WriteFullBeginTag("option");
            writer.WriteBeginTag("onevent");
            writer.WriteAttribute("type", "onpick");
            writer.Write(">");
            writer.WriteBeginTag("go");
            writer.WriteAttribute("href", "#" + WmlTextWriter.PostBackWithVarsCardID);
            writer.Write(">");
            if (!String.IsNullOrEmpty(target))
            {
                writer.WriteBeginTag("setvar");
                writer.WriteAttribute("name", _postBackEventTargetVarName);
                writer.WriteAttribute("value", target);
                writer.Write(" />");
            }
            if (!String.IsNullOrEmpty(argument))
            {
                writer.WriteBeginTag("setvar");
                writer.WriteAttribute("name", _postBackEventArgumentVarName);
                writer.WriteAttribute("value", argument);
                writer.Write(" />");
            }
            writer.WriteEndTag("go");
            writer.WriteEndTag("onevent");
            writer.WriteEncodedText(text);
            writer.WriteEndTag("option");
            _writtenPostBack  = true;
            _usePostBackCards = true;
        }
        protected internal override void Render(HtmlTextWriter writer)
        {
            WmlTextWriter wmlWriter = (WmlTextWriter)writer;

            if (Page.Form == null)
            {
                throw new HttpException(SR.GetString(SR.PageAdapter_MustHaveFormRunatServer));
            }
            if (Page.HasRenderDelegate())
            {
                throw new HttpException(SR.GetString(SR.PageAdapter_RenderDelegateMustBeInServerForm));
            }
            if (RequiresUTF8ContentEncoding())
            {
                Page.Response.ContentEncoding = _utf8Encoding;
            }

            InitializeWriter(wmlWriter);
            RenderXmlHeader(wmlWriter);
            wmlWriter.WriteFullBeginTag("wml");
            RenderCacheExpiry(wmlWriter);
            HtmlForm form = Page.Form;

            AnalyzeAndRenderHtmlForm(wmlWriter, form);
            RenderPostBackCard(wmlWriter);
            wmlWriter.WriteEndTag("wml");
        }
        // Render a select option.
        public virtual void RenderSelectOption(WmlTextWriter writer, string text)
        {
            if (writer.AnalyzeMode)
            {
                return;
            }

            writer.WriteFullBeginTag("option");
            writer.WriteEncodedText(text);
            writer.WriteEndTag("option");
        }
 public void RenderSelectOptionAsAutoPostBack(WmlTextWriter writer, string text, string groupName, string value)
 {
     if (writer.AnalyzeMode)
     {
         return;
     }
     writer.WriteFullBeginTag("option");
     writer.WriteBeginTag("onevent");
     writer.WriteAttribute("type", "onpick");
     writer.Write(">");
     writer.WriteBeginTag("go");
     writer.WriteAttribute("href", "#" + WmlTextWriter.PostBackWithVarsCardID);
     writer.Write(">");
     writer.WriteBeginTag("setvar");
     writer.WriteAttribute("name", writer.MapClientIDToShortName(groupName, false));
     writer.WriteAttribute("value", value);
     writer.Write(" />");
     writer.WriteEndTag("go");
     writer.WriteEndTag("onevent");
     writer.WriteEncodedText(text);
     writer.WriteEndTag("option");
     _writtenPostBack  = true;
     _usePostBackCards = true;
 }
Ejemplo n.º 5
0
 public void RenderSelectOptionAsAutoPostBack(WmlTextWriter writer, string text, string groupName, string value) {
     if (writer.AnalyzeMode) {
         return;
     }
     writer.WriteFullBeginTag("option");
     writer.WriteBeginTag("onevent");
     writer.WriteAttribute("type", "onpick");
     writer.Write(">");
     writer.WriteBeginTag("go");
     writer.WriteAttribute("href", "#" + WmlTextWriter.PostBackWithVarsCardID);
     writer.Write(">");
     writer.WriteBeginTag("setvar");
     writer.WriteAttribute("name", writer.MapClientIDToShortName(groupName, false));
     writer.WriteAttribute("value", value);
     writer.Write(" />");
     writer.WriteEndTag("go");
     writer.WriteEndTag("onevent");
     writer.WriteEncodedText(text);
     writer.WriteEndTag("option");
     _writtenPostBack = true;
     _usePostBackCards = true;
 }
Ejemplo n.º 6
0
        public virtual void RenderSelectOptionAsPostBack(WmlTextWriter writer, string text, String target, String argument) {
            if (writer.AnalyzeMode) {
                return;
            }

            writer.WriteFullBeginTag("option");
            writer.WriteBeginTag("onevent");
            writer.WriteAttribute("type", "onpick");
            writer.Write(">");
            writer.WriteBeginTag("go");
            writer.WriteAttribute("href", "#" + WmlTextWriter.PostBackWithVarsCardID);
            writer.Write(">");
            if (!String.IsNullOrEmpty(target)) {
                writer.WriteBeginTag("setvar");
                writer.WriteAttribute("name", _postBackEventTargetVarName);
                writer.WriteAttribute("value", target);
                writer.Write(" />");
            }
            if (!String.IsNullOrEmpty(argument)) {
                writer.WriteBeginTag("setvar");
                writer.WriteAttribute("name", _postBackEventArgumentVarName);
                writer.WriteAttribute("value", argument);
                writer.Write(" />");
            }
            writer.WriteEndTag("go");
            writer.WriteEndTag("onevent");
            writer.WriteEncodedText(text);
            writer.WriteEndTag("option");
            _writtenPostBack = true;
            _usePostBackCards = true;
        }
Ejemplo n.º 7
0
        // Render a select option.
        public virtual void RenderSelectOption(WmlTextWriter writer, string text) {
            if (writer.AnalyzeMode) {
                return;
            }

            writer.WriteFullBeginTag("option");
            writer.WriteEncodedText(text);
            writer.WriteEndTag("option");
        }