protected void Page_Load(object sender, EventArgs e)
 {
     log4net.ILog log = PtaUtil.getLog4netLogger(this.GetType().FullName + ".Page_Load(): ");
     if (!"Save".Equals(Request.Form["btnSave"]))
     {
         try {
             log.Debug("Request.ContentEncoding.EncodingName: " + Request.ContentEncoding.EncodingName);
             log.Debug("Response.ContentEncoding.EncodingName: " + Response.ContentEncoding.EncodingName);
             Request.ContentEncoding  = System.Text.Encoding.UTF8;
             Response.ContentEncoding = System.Text.Encoding.UTF8;
             hfGuid.Value             = Request[PtaServerConstants.OURGUID_KEY];
             bboardDR = PtaUtil.GetBBoardDataReaderByGuid(hfGuid.Value);
             RequestValidator rv = new RequestValidator(bboardDR);
             rv.Validate(Request);
             if (!"_1_1".Equals(Request[PtaServerConstants.USERID_KEY]))
             {
                 throw new PtaException("Access is allowed only for Blackboard Administrator (userid = \"_1_1\"). Current user_id: " + Request[PtaServerConstants.USERID_KEY]);
             }
             hlBackToBB.NavigateUrl = Request.Form["tcbaseurl"] + Request.Form["returnurl"];
             lblSaveXMLResult.Text  = "";
             //throw new PtaException("test how error will be processed on remote config");
             String bb_code = PtaUtil.GetDBReaderStringField(bboardDR, "BBoardCode");
             txtXML.Text = PtaUtil.GetBBMenuLinkParamXML(bb_code);
         } catch (Exception exc) {
             PtaUtil.LogExceptionAndFormParameters(log, exc);
             String err_page = PtaUtil.GenerateSimpleErrorPage(hlBackToBB.NavigateUrl);
             Response.Write(err_page);
             Response.End();
         } finally {
             PtaUtil.CloseDataReader(bboardDR);
         }
     }
 }
        protected void gvBBoard_SelectedIndexChanged(object sender, EventArgs e)
        {
            String bb_code = gvBBoard.SelectedValue.ToString();

            txtXML.Text           = PtaUtil.GetBBMenuLinkParamXML(bb_code);
            lblSaveXMLResult.Text = "";
        }