public void OnWebPageLoaded(StringCollection sc)
        {
            ClassPointer cp = this.Owner as ClassPointer;

            //
            if (_resourceFiles == null)
            {
                _resourceFiles = new List <WebResourceFile>();
            }
            bool   b;
            string btimg = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "dropdownbutton.jpg");

            if (File.Exists(btimg))
            {
                _resourceFiles.Add(new WebResourceFile(btimg, WebResourceFile.WEBFOLDER_Images, out b));
            }
            btimg = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "calendar.jpg");
            if (File.Exists(btimg))
            {
                _resourceFiles.Add(new WebResourceFile(btimg, WebResourceFile.WEBFOLDER_Images, out b));
            }
            btimg = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "datepicker.css");
            if (File.Exists(btimg))
            {
                _resourceFiles.Add(new WebResourceFile(btimg, WebResourceFile.WEBFOLDER_Css, out b));
            }
            string[] jsFiles = new string[14];
            jsFiles[0]  = "backstripes.gif";
            jsFiles[1]  = "bg_header.jpg";
            jsFiles[2]  = "bullet1.gif";
            jsFiles[3]  = "bullet2.gif";
            jsFiles[4]  = "cal.gif";
            jsFiles[5]  = "cal-grey.gif";
            jsFiles[6]  = "datepicker.js";
            jsFiles[7]  = "gradient-e5e5e5-ffffff.gif";
            jsFiles[8]  = "ok.png";
            jsFiles[9]  = "cancel.png";
            jsFiles[10] = "qry.jpg";
            jsFiles[11] = "chklist.jpg";
            jsFiles[12] = "plus.gif";
            jsFiles[13] = "minus.gif";
            for (int i = 0; i < jsFiles.Length; i++)
            {
                btimg = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), jsFiles[i]);
                if (File.Exists(btimg))
                {
                    WebResourceFile w = new WebResourceFile(btimg, WebResourceFile.WEBFOLDER_Javascript, out b);
                    _resourceFiles.Add(w);
                    string tgt = Path.Combine(Path.Combine(cp.Project.WebPhysicalFolder(null), w.WebFolder), Path.GetFileName(btimg));
                    File.Copy(btimg, tgt, true);
                }
            }
            //
            sc.Add("\r\n");
            sc.Add(string.Format(CultureInfo.InvariantCulture, "var {0} = document.getElementById('{0}');\r\n", CodeName));
            if (this.ReadOnly)
            {
                sc.Add(string.Format(CultureInfo.InvariantCulture, "{0}.ReadOnly=true;\r\n", CodeName));
            }
            if (_highlightCellColor != Color.Empty)
            {
                sc.Add(string.Format(CultureInfo.InvariantCulture, "{0}.HighlightCellColor='{1}';\r\n", CodeName, ObjectCreationCodeGen.GetColorString(_highlightCellColor)));
            }
            if (_alternateColor != Color.Empty)
            {
                sc.Add(string.Format(CultureInfo.InvariantCulture, "{0}.AlternateBackgroundColor='{1}';\r\n", CodeName, ObjectCreationCodeGen.GetColorString(_alternateColor)));
            }
            if (_highlightRowColor != Color.Empty)
            {
                sc.Add(string.Format(CultureInfo.InvariantCulture, "{0}.HighlightRowColor='{1}';\r\n", CodeName, ObjectCreationCodeGen.GetColorString(_highlightRowColor)));
            }
            if (_selectRowColor != Color.Empty)
            {
                sc.Add(string.Format(CultureInfo.InvariantCulture, "{0}.SelectedRowColor='{1}';\r\n", CodeName, ObjectCreationCodeGen.GetColorString(_selectRowColor)));
            }
            if (DatePickerFonstSize != 12)
            {
                sc.Add(string.Format(CultureInfo.InvariantCulture, "{0}.DatePickerFonstSize={1};\r\n", CodeName, DatePickerFonstSize));
            }
            IDataSetSource ds = DataSource as IDataSetSource;

            if (ds != null)
            {
                string[] flds = ds.GetReadOnlyFields();
                if (flds != null && flds.Length > 0)
                {
                    sc.Add(string.Format(CultureInfo.InvariantCulture,
                                         "{0}.ReadOnlyFields = [\r\n", CodeName));
                    for (int i = 0; i < flds.Length; i++)
                    {
                        if (i > 0)
                        {
                            sc.Add(",");
                        }
                        sc.Add("'");
                        sc.Add(flds[i]);
                        sc.Add("'");
                    }
                    sc.Add("\r\n];\r\n");
                }
            }
            _useDatetimePicker = false;
            if (_editorList != null)
            {
                sc.Add(string.Format(CultureInfo.InvariantCulture,
                                     "{0}.FieldEditors = {{}};\r\n", CodeName));
                for (int i = 0; i < FieldCount; i++)
                {
                    string cn = this.GetFieldNameByIndex(i);
                    for (int j = 0; j < _editorList.Count; j++)
                    {
                        if (_editorList[j] != null && !(_editorList[j] is WebDataEditorNone))
                        {
                            if (string.Compare(cn, _editorList[j].ValueField, StringComparison.OrdinalIgnoreCase) == 0)
                            {
                                string s = _editorList[j].CreateJavascriptEditor(sc);
                                sc.Add(string.Format(CultureInfo.InvariantCulture,
                                                     "{0}.FieldEditors[{1}] = {2};\r\n",
                                                     CodeName, i, s));
                                if (_editorList[j] is WebDataEditorDatetime)
                                {
                                    _useDatetimePicker = true;
                                }
                                break;
                            }
                        }
                    }
                }
            }
            if (ActionControls.Count > 0)
            {
                bool          first = true;
                StringBuilder sbAc  = new StringBuilder();
                for (int j = 0; j < ActionControls.Count; j++)
                {
                    string nmAct = ActionControls[j];
                    if (!string.IsNullOrEmpty(nmAct))
                    {
                        if (first)
                        {
                            first = false;
                        }
                        else
                        {
                            sbAc.Append(",");
                        }
                        sbAc.Append(string.Format(CultureInfo.InvariantCulture, "'{0}'", nmAct));
                    }
                }
                if (!first)
                {
                    sc.Add(string.Format(CultureInfo.InvariantCulture,
                                         "{0}.ActControls = [{1}];\r\n", CodeName, sbAc.ToString()));
                    if (ActionColumnWidth > 0)
                    {
                        sc.Add(string.Format(CultureInfo.InvariantCulture,
                                             "{0}.ActColWidth={1};\r\n", CodeName, ActionColumnWidth));
                    }
                }
            }
        }