//##########################################################################################
 //# Public Functions
 //##########################################################################################
 ///############################################################
 /// <summary>
 /// Binds a data source to the invoked server control and all its child controls.
 /// </summary>
 ///############################################################
 /// <LastUpdated>February 15, 2010</LastUpdated>
 public override void DataBind()
 {
     //#### Flip the value of g_bIsDataBound, then pass the call into .DoDataBind to do the actual work, then onto our .base implementation
     g_bIsDataBound = true;
     InputCollectionControlCommon.DoDataBind(gl_oInputs, g_oDataSource, 0);
     base.DataBind();
 }
        ///############################################################
        /// <summary>
        /// Renders the control to the specified HTML writer.
        /// </summary>
        /// <remarks>
        /// NOTE: This function will ignore any non-existant <c>sInputAlias</c>'s.
        /// </remarks>
        /// <param name="sInputAlias">String representing the HTML input's unique base name.</param>
        /// <param name="eInputType">Enumeration representing the input type to render.</param>
        /// <param name="sInitialValue">String representing the initial value of the input.</param>
        /// <param name="a_sInitialValues">Array of strings where each element represents an initial value of the input.</param>
        /// <param name="bForceInitialValue">Boolean value representing if the value of the input is always to be set to <paramref name="sInitialValue"/>/<paramref name="a_sInitialValues"/>.</param>
        /// <param name="sAttributes">String representing the additional HTML attributes to apply to the input.</param>
        /// <param name="writer">HtmlTextWriter object as automatically provided by the host ASPX page.</param>
        ///############################################################
        /// <LastUpdated>February 15, 2010</LastUpdated>
        internal void RenderInput(string sInputAlias, enumInputTypes eInputType, string sInitialValue, string[] a_sInitialValues, bool bForceInitialValue, string sAttributes, HtmlTextWriter writer)
        {
            //#### If this is a .cnCustom control (as .DoRenderInput was unable to do the render itself)
            //####     NOTE: An event is required for the control as there is no other way not to call .Parent's .Render function, so this hook/event allows the developer to change the .Render if they so choose.
            if (!InputCollectionControlCommon.DoRenderInput(sInputAlias, eInputType, sInitialValue, a_sInitialValues, bForceInitialValue, sAttributes, writer, g_oInputCollection))
            {
                //#### If the developer has defined delegate(s), raise the .GenerateHTML event
                if (GenerateHTML != null)
                {
                    writer.Write(GenerateHTML(this, new GenerateHTMLEventArgs(sInputAlias, eInputType, sInitialValue, a_sInitialValues, sAttributes)));
                }
                //#### Else the required delegate(s) were not defined, so raise the error
                else
                {
//! should use a CnException
                    throw new NotImplementedException();
                }
            }
        }