//========================================================
        //Page event handlers
        //========================================================

        /// --------------------------------------------------------
        private void Page_Load(object sender, System.EventArgs e)
        {
            // do site security
            DoSecurity();

            // get id from querystring
            _selectedCommentID = DesignedNet.Framework.Web.Common.GetID(Request.QueryString, "CommentID");
            if (_selectedCommentID < 1)
            {
                _selectedCommentID = DesignedNet.Framework.Web.Common.GetID(ViewState, "CommentID");
            }

            // populate list control
            _commentList = new BizComment();
            _commentList.List();
            list.DataSource = _commentList;

            // decide page mode
            _comment       = new BizComment();
            _comment.Table = _commentList.Table;
            if (_selectedCommentID > 0)
            {
                // load selected
                if (_comment.Find(_selectedCommentID))
                {
                    edit.DataSource = _comment;
                    view.DataSource = _comment;
                    if (!Page.IsPostBack)
                    {
                        Render(Common.PageMode.View);
                    }
                }
                else                 // user not found
                {
                    Render(Common.PageMode.Error, "The item selected was not found in the database!");
                }
            }
            else
            {
                if (!Page.IsPostBack)
                {
                    Render(Common.PageMode.New);
                }
            }
        }