public override void Render(WmlMobileTextWriter writer)
        {
            string Format;

            if (Control.Numeric)
            {
                Format = "*N"; //Set format to any number of numeric characters
            }
            else
            {
                Format = "*M"; //Set format to any number of characters
            }
            writer.RenderTextBox(Control.UniqueID, Control.Text, Format, Control.Title,
                                 Control.Password, Control.Size, Control.MaxLength, false, Control.BreakAfter);
        }
        public override void Render(WmlMobileTextWriter writer)
        {
            String value            = Control.Text;
            bool   requiresRandomID = RequiresRandomID();

            writer.EnterLayout(Style);
            if (Control.Password)
            {
                value = String.Empty;
            }

            if (!PageAdapter.RequiresValueAttributeInInputTag())
            {
                writer.AddFormVariable(Control.ClientID, value, requiresRandomID);
            }
            else
            {
                // This is to make sure an id is determined in the first
                // pass, and this is done in AddFormVariable as well.
                writer.MapClientIDToShortName(Control.ClientID, requiresRandomID);
            }

            String format = ((IAttributeAccessor)Control).GetAttribute("wmlFormat");

            if (format == null || format == String.Empty)
            {
                if (Control.Numeric)
                {
                    format = "*N";
                }
                else
                {
                    format = null;
                }
            }

            writer.RenderTextBox(Control.ClientID,
                                 value,
                                 format,
                                 Control.Title,
                                 Control.Password,
                                 Control.Size,
                                 Control.MaxLength,
                                 requiresRandomID,
                                 Control.BreakAfter);
            writer.ExitLayout(Style);
        }
        /// <include file='doc\WmlTextBoxAdapter.uex' path='docs/doc[@for="WmlTextBoxAdapter.Render"]/*' />
        public override void Render(WmlMobileTextWriter writer)
        {
            String value = Control.Text;
            bool requiresRandomID = RequiresRandomID();

            writer.EnterLayout(Style);
            if (Control.Password)
            {
                value = String.Empty;
            }

            if (!PageAdapter.RequiresValueAttributeInInputTag())
            {
                writer.AddFormVariable(Control.ClientID, value, requiresRandomID);
            }
            else
            {
                // This is to make sure an id is determined in the first
                // pass, and this is done in AddFormVariable as well.
                writer.MapClientIDToShortName(Control.ClientID, requiresRandomID);
            }

            String format = ((IAttributeAccessor)Control).GetAttribute("wmlFormat");
            if (String.IsNullOrEmpty(format))
            {
                if (Control.Numeric)
                {
                    format = "*N";
                }
                else
                {
                    format = null;
                }
            }
            
            writer.RenderTextBox(Control.ClientID, 
                                 value,
                                 format, 
                                 Control.Title,
                                 Control.Password, 
                                 Control.Size, 
                                 Control.MaxLength, 
                                 requiresRandomID,
                                 Control.BreakAfter);
            writer.ExitLayout(Style);
        }