/// <summary>
        /// Creates a HtmlTextAreaTag from a HTMLTextAreaElementClass.
        /// </summary>
        /// <param name="textareaElement"> The HTMLTextAreaElementClass to convert.</param>
        /// <returns> A HtmlTextAreaTag.</returns>
        private HtmlTextAreaTag CreateHtmlTextAreaTag(HTMLTextAreaElementClass textareaElement)
        {
            HtmlTextAreaTag tag = new HtmlTextAreaTag();

            tag.Class = textareaElement.className;
            tag.Id = textareaElement.id;
            if ( textareaElement.name != null )
            {
                tag.Name = textareaElement.name;
            }
            else
            {
                if ( textareaElement.id != null )
                {
                    tag.Name = textareaElement.id;
                }
                else
                {
                    tag.Name = textareaElement.uniqueID;
                    tag.Id = textareaElement.uniqueID;
                }
            }
            // tag.OnClick = currentNode.GetAttribute("onclick",currentNode.NamespaceURI);
            // tag.Style = currentNode.GetAttribute("style",currentNode.NamespaceURI);
            tag.Title = textareaElement.title;
            tag.Value = textareaElement.value;

            return tag;
        }
        private void AddTextAreaNode(FormEditorNode node,HtmlTextAreaTag textarea)
        {
            string label;
            label = "<textarea ";
            label +=" name="+ textarea.Name;
            label +=">";
            label +=textarea.Value;
            label +="</textarea>";

            formEditor.AddTextArea(node,label,textarea);
        }
        /// <summary>
        /// Adds a TextArea node.
        /// </summary>
        /// <param name="root"> The root node.</param>
        /// <param name="text"> The node text.</param>
        /// <param name="tag"> The HtmlTextAreaTag.</param>
        public void AddTextArea(FormEditorNode root, string text,HtmlTextAreaTag tag)
        {
            FormEditorNode node = new FormEditorNode();

            // add it to root node
            root.Nodes.Add(node);

            node.Text=text;
            node.BaseHtmlTag = tag;

            TextBox[] textboxes;

            textboxes = GetTextBoxArray(1);
            textboxes[0].Size = new Size(300,15);
            textboxes[0].Name = "txtValue";
            textboxes[0].Text = tag.Value;
            node.AddTextControl("Value:",textboxes[0],new EventHandler(TextAreaChangeValue));
        }
        /// <summary>
        /// Adds the textarea tag post data string.
        /// </summary>
        /// <param name="textarea"> The textarea tag.</param>
        /// <param name="list"> The arraylist to append tag.</param>
        public void AddTextAreaPostData(HtmlTextAreaTag textarea, ArrayList list)
        {
            // no Name, so we cant send it to server
            if ( !textarea.Name.StartsWith("ms__id") )
            {
                string s = EncodeDecode.UrlEncode(textarea.Name) + "=" + EncodeDecode.UrlEncode(textarea.Value);

                //name and value
                list.Add(s);
            }
        }
        /// <summary>
        /// Adds the textarea tag post data string.
        /// </summary>
        /// <param name="textarea"> The textarea tag.</param>
        /// <param name="list"> The arraylist to append tag.</param>
        /// <param name="addEndLine"> The add end line boolean value.</param>
        public void AddTextAreaPostData(HtmlTextAreaTag textarea, ArrayList list, bool addEndLine)
        {
            if ( addEndLine )
            {
                textarea.Value = AddEndLine(textarea.Value);
            }

            AddTextAreaPostData(textarea, list);
        }
        /// <summary>
        /// Creates a textarea tag.
        /// </summary>
        /// <param name="currentNode"> The XPathNavigator node.</param>
        /// <returns> A HtmlTextAreaTag.</returns>
        private HtmlTextAreaTag FillTextAreaTag(XPathNavigator currentNode)
        {
            HtmlTextAreaTag tag = new HtmlTextAreaTag();

            tag.Class=currentNode.GetAttribute("class",currentNode.NamespaceURI);
            tag.Id=currentNode.GetAttribute("id",currentNode.NamespaceURI);
            tag.Name=currentNode.GetAttribute("name",currentNode.NamespaceURI);
            tag.OnClick=currentNode.GetAttribute("onclick",currentNode.NamespaceURI);
            tag.Style=currentNode.GetAttribute("style",currentNode.NamespaceURI);
            tag.Title=currentNode.GetAttribute("title",currentNode.NamespaceURI);
            tag.Value=currentNode.Value;

            if ( tag.OnClick.Length == 0 )
            {
                tag.OnClick = currentNode.GetAttribute("onClick",currentNode.NamespaceURI);
            }

            return tag;
        }