/// <summary>
        /// Returns the zero-based index of the first occurrence of the specified 
        /// <see cref="FormMappingDataRelation"/> in the <see cref="FormMappingDataRelationList"/>.
        /// </summary>
        /// <param name="value">The <see cref="FormMappingDataRelation"/> object 
        /// to locate in the <see cref="FormMappingDataRelationList"/>.
        /// This argument can be a null reference.
        /// </param>    
        /// <returns>
        /// The zero-based index of the first occurrence of <paramref name="value"/> 
        /// in the <see cref="FormMappingDataRelationList"/>, if found; otherwise, -1.
        /// </returns>
        /// <remarks>Please refer to <see cref="ArrayList.IndexOf"/> for details.</remarks>
        public virtual int IndexOf(FormMappingDataRelation value)
        {
            if ((object) value == null)
            {
                for (int i = 0; i < this._count; i++)
                    if ((object) this._array[i] == null)
                        return i;

                return -1;
            }

            for (int i = 0; i < this._count; i++)
                if (value.Equals(this._array[i]))
                    return i;

            return -1;
        }
        /// <summary>
        /// Inserts a <see cref="FormMappingDataRelation"/> element into the 
        /// <see cref="FormMappingDataRelationList"/> at the specified index.
        /// </summary>
        /// <param name="index">The zero-based index at which <paramref name="value"/> 
        /// should be inserted.</param>
        /// <param name="value">The <see cref="FormMappingDataRelation"/> object
        /// to insert into the <see cref="FormMappingDataRelationList"/>.
        /// This argument can be a null reference.
        /// </param>    
        /// <exception cref="ArgumentOutOfRangeException">
        /// <para><paramref name="index"/> is less than zero.</para>
        /// <para>-or-</para>
        /// <para><paramref name="index"/> is greater than <see cref="Count"/>.</para>
        /// </exception>
        /// <exception cref="NotSupportedException">
        /// <para>The <see cref="FormMappingDataRelationList"/> is read-only.</para>
        /// <para>-or-</para>
        /// <para>The <b>FormMappingDataRelationList</b> has a fixed size.</para></exception>    
        /// <remarks>Please refer to <see cref="ArrayList.Insert"/> for details.</remarks>
        public virtual void Insert(int index, FormMappingDataRelation value)
        {
            if (index < 0)
                throw new ArgumentOutOfRangeException("index", index, "Argument cannot be negative.");
            if (index > this._count)
                throw new ArgumentOutOfRangeException("index", index, "Argument cannot exceed Count.");

            if (this._count == this._array.Length)
                EnsureCapacity(this._count + 1);

            ++this._version;
            if (index < this._count)
                Array.Copy(this._array, index, this._array, index + 1, this._count - index);

            this._array[index] = value;
            ++this._count;
        }
 /// <summary>
 /// Determines whether the <see cref="FormMappingDataRelationList"/>
 /// contains the specified <see cref="FormMappingDataRelation"/> element.
 /// </summary>
 /// <param name="value">The <see cref="FormMappingDataRelation"/> object
 /// to locate in the <see cref="FormMappingDataRelationList"/>.
 /// This argument can be a null reference.
 /// </param>    
 /// <returns><c>true</c> if <paramref name="value"/> is found in the 
 /// <see cref="FormMappingDataRelationList"/>; otherwise, <c>false</c>.</returns>
 /// <remarks>Please refer to <see cref="ArrayList.Contains"/> for details.</remarks>
 public virtual bool Contains(FormMappingDataRelation value)
 {
     return (IndexOf(value) >= 0);
 }
 /// <summary>
 /// Copies the entire <see cref="FormMappingDataRelationList"/> to a one-dimensional <see cref="Array"/>
 /// of <see cref="FormMappingDataRelation"/> elements, starting at the specified index of the target array.
 /// </summary>
 /// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the
 /// <see cref="FormMappingDataRelation"/> elements copied from the <see cref="FormMappingDataRelationList"/>.
 /// The <b>Array</b> must have zero-based indexing.</param>
 /// <param name="arrayIndex">The zero-based index in <paramref name="array"/> 
 /// at which copying begins.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="array"/> is a null reference.</exception>    
 /// <exception cref="ArgumentOutOfRangeException">
 /// <paramref name="arrayIndex"/> is less than zero.</exception>    
 /// <exception cref="ArgumentException"><para>
 /// <paramref name="arrayIndex"/> is equal to or greater than the length of <paramref name="array"/>.
 /// </para><para>-or-</para><para>
 /// The number of elements in the source <see cref="FormMappingDataRelationList"/> is greater than the
 /// available space from <paramref name="arrayIndex"/> to the end of the destination 
 /// <paramref name="array"/>.</para></exception>
 /// <remarks>Please refer to <see cref="ArrayList.CopyTo"/> for details.</remarks>
 public virtual void CopyTo(FormMappingDataRelation[] array, int arrayIndex)
 {
     CheckTargetArray(array, arrayIndex);
     Array.Copy(this._array, 0, array, arrayIndex, this._count);
 }
 public override void CopyTo(FormMappingDataRelation[] array)
 {
     this._collection.CopyTo(array);
 }
        /// <summary>
        /// Adds the elements of a <see cref="FormMappingDataRelation"/> array 
        /// to the end of the <see cref="FormMappingDataRelationList"/>.
        /// </summary>
        /// <param name="array">An <see cref="Array"/> of <see cref="FormMappingDataRelation"/> elements
        /// that should be added to the end of the <see cref="FormMappingDataRelationList"/>.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="array"/> is a null reference.</exception>    
        /// <exception cref="NotSupportedException">
        /// <para>The <see cref="FormMappingDataRelationList"/> is read-only.</para>
        /// <para>-or-</para>
        /// <para>The <b>FormMappingDataRelationList</b> has a fixed size.</para></exception>    
        /// <remarks>Please refer to <see cref="ArrayList.AddRange"/> for details.</remarks>
        public virtual void AddRange(FormMappingDataRelation[] array)
        {
            if (array == null)
                throw new ArgumentNullException("array");

            if (array.Length == 0) return;
            if (this._count + array.Length > this._array.Length)
                EnsureCapacity(this._count + array.Length);

            ++this._version;
            Array.Copy(array, 0, this._array, this._count, array.Length);
            this._count += array.Length;
        }
 public override void Insert(int index, FormMappingDataRelation value)
 {
     lock (this._root) this._collection.Insert(index, value);
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="FormMappingDataRelationList"/> class
        /// that contains elements copied from the specified <see cref="FormMappingDataRelation"/>
        /// array and that has the same initial capacity as the number of elements copied.
        /// </summary>
        /// <param name="array">An <see cref="Array"/> of <see cref="FormMappingDataRelation"/> 
        /// elements that are copied to the new collection.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="array"/> is a null reference.</exception>        
        /// <remarks>Please refer to <see cref="ArrayList(ICollection)"/> for details.</remarks>    
        public FormMappingDataRelationList(FormMappingDataRelation[] array)
        {
            if (array == null)
                throw new ArgumentNullException("array");

            this._array = new FormMappingDataRelation[array.Length];
            AddRange(array);
        }
 public override void CopyTo(FormMappingDataRelation[] array, int arrayIndex)
 {
     lock (this._root) this._collection.CopyTo(array, arrayIndex);
 }
 public override int IndexOf(FormMappingDataRelation value)
 {
     lock (this._root) return this._collection.IndexOf(value);
 }
 public override bool Contains(FormMappingDataRelation value)
 {
     lock (this._root) return this._collection.Contains(value);
 }
 public override void AddRange(FormMappingDataRelation[] array)
 {
     lock (this._root) this._collection.AddRange(array);
 }
 public override void Remove(FormMappingDataRelation value)
 {
     throw new NotSupportedException("Read-only collections cannot be modified.");
 }
 /// <summary>
 /// Removes the first occurrence of the specified <see cref="FormMappingDataRelation"/>
 /// from the <see cref="FormMappingDataRelationList"/>.
 /// </summary>
 /// <param name="value">The <see cref="FormMappingDataRelation"/> object
 /// to remove from the <see cref="FormMappingDataRelationList"/>.
 /// This argument can be a null reference.
 /// </param>    
 /// <exception cref="NotSupportedException">
 /// <para>The <see cref="FormMappingDataRelationList"/> is read-only.</para>
 /// <para>-or-</para>
 /// <para>The <b>FormMappingDataRelationList</b> has a fixed size.</para></exception>    
 /// <remarks>Please refer to <see cref="ArrayList.Remove"/> for details.</remarks>
 public virtual void Remove(FormMappingDataRelation value)
 {
     int index = IndexOf(value);
     if (index >= 0) RemoveAt(index);
 }
 public override void Remove(FormMappingDataRelation value)
 {
     lock (this._root) this._collection.Remove(value);
 }
 /// <summary>
 /// Copies the elements of the <see cref="FormMappingDataRelationList"/> to a new
 /// <see cref="Array"/> of <see cref="FormMappingDataRelation"/> elements.
 /// </summary>
 /// <returns>A one-dimensional <see cref="Array"/> of <see cref="FormMappingDataRelation"/> 
 /// elements containing copies of the elements of the <see cref="FormMappingDataRelationList"/>.</returns>
 /// <remarks>Please refer to <see cref="ArrayList.ToArray"/> for details.</remarks>
 public virtual FormMappingDataRelation[] ToArray()
 {
     FormMappingDataRelation[] array = new FormMappingDataRelation[this._count];
     Array.Copy(this._array, array, this._count);
     return array;
 }
        /// <summary>
        /// Adds a <see cref="FormMappingDataRelation"/> to the end of the <see cref="FormMappingDataRelationList"/>.
        /// </summary>
        /// <param name="value">The <see cref="FormMappingDataRelation"/> object 
        /// to be added to the end of the <see cref="FormMappingDataRelationList"/>.
        /// This argument can be a null reference.
        /// </param>    
        /// <returns>The <see cref="FormMappingDataRelationList"/> index at which the 
        /// <paramref name="value"/> has been added.</returns>
        /// <exception cref="NotSupportedException">
        /// <para>The <see cref="FormMappingDataRelationList"/> is read-only.</para>
        /// <para>-or-</para>
        /// <para>The <b>FormMappingDataRelationList</b> has a fixed size.</para></exception>    
        /// <remarks>Please refer to <see cref="ArrayList.Add"/> for details.</remarks>
        public virtual int Add(FormMappingDataRelation value)
        {
            if (this._count == this._array.Length)
                EnsureCapacity(this._count + 1);

            ++this._version;
            this._array[this._count] = value;
            return this._count++;
        }
        private FormMappingDataRelationList CreateFormMappingRelations(Hashtable postData, HtmlFormTag formTag)
        {
            FormMappingDataRelationList relationList = new FormMappingDataRelationList();

            foreach ( DictionaryEntry de in formTag )
            {
                HtmlTagBaseList controlArray = (HtmlTagBaseList)de.Value;

                #region Tag Collection
                foreach ( HtmlTagBase tag in controlArray )
                {
                    string name = string.Empty;

                    if (tag is HtmlInputTag)
                    {
                        HtmlInputTag input=(HtmlInputTag)tag;
                        name = input.Name;
                    }

                    if (tag is HtmlButtonTag)
                    {
                        HtmlButtonTag button = (HtmlButtonTag)tag;
                        name = button.Name;
                    }

                    if (tag is HtmlSelectTag)
                    {
                        HtmlSelectTag select = (HtmlSelectTag)tag;
                        name = select.Name;
                    }

                    if (tag is HtmlTextAreaTag)
                    {
                        HtmlTextAreaTag textarea=(HtmlTextAreaTag)tag;
                        name = textarea.Name;
                    }

                    FormMappingDataRelation relation = new FormMappingDataRelation();
                    relation.CurrentValue = (string)postData[name];
                    relation.FieldName = name;

                    relationList.Add(relation);
                    //relation.FormMappingCopyType = FormMappingDataTransformation.
                }
                #endregion
            }

            return relationList;
        }
 public override void AddRange(FormMappingDataRelation[] array)
 {
     throw new NotSupportedException("Read-only collections cannot be modified.");
 }