コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (String.IsNullOrEmpty(Request.QueryString["q"]))
         {
             LoadDocument();
         }
         else
         {
             SearchDocumentByTagName();
         }
     }
     catch (IndexOutOfRangeException ex)
     {
         ErrorLoging.WriteLog(String.Format("Message: {0}\nTarget: {1}\nDetails: {2}", ex.Message, ex.TargetSite, ex.StackTrace), System.Diagnostics.EventLogEntryType.Error);
     }
     catch (NullReferenceException ex)
     {
         ErrorLoging.WriteLog(String.Format("Message: {0}\nTarget: {1}\nDetails: {2}", ex.Message, ex.TargetSite, ex.StackTrace), System.Diagnostics.EventLogEntryType.Error);
     }
     catch (Exception ex)
     {
         ErrorLoging.WriteLog(String.Format("Message: {0}\nTarget: {1}\nDetails: {2}", ex.Message, ex.TargetSite, ex.StackTrace), System.Diagnostics.EventLogEntryType.Error);
         Response.Redirect("error.aspx");
     }
 }
コード例 #2
0
ファイル: test.aspx.cs プロジェクト: phucthotran/free-pdf-web
        protected void Page_Load(object sender, EventArgs e)
        {
            //DocumentRatingModel rating = new DocumentRatingModel();
            //rating.DocumentAverageRate(2);

            ErrorLoging.WriteLog("test phat", System.Diagnostics.EventLogEntryType.Information);

            //DocumentModel docModel = new DocumentModel();
            //CallMethodByText(docModel, "GetDocumentById", new object[] { 2 });
            //Testing(docModel.GetType(), docModel);

            //dynamic dym = CallMethodByString("BusinessLogicLayer.DocumentModel", "GetDocumentList");

            //String path = new Uri("http://*****:*****@"(page=)\d{1,9}");
            String s  = rg.Replace(Request.Url.OriginalString, "page=4");
        }