Click here to Skip to main content
15,892,537 members
Articles / Web Development / ASP.NET

Xml Editor: Work with DataTable, DataView and DataGrid

Rate me:
Please Sign up or sign in to vote.
3.00/5 (8 votes)
2 Oct 2006 39.1K   525   17  
Lets Work with XML, DataTable, DataView and DataGrid
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    
  <system.web>

    <!--  動態偵錯編譯
          設定 compilation debug="true" 以啟用 ASPX 偵錯。否則,將這個值設定為
          false 將可增進這個應用程式的 Runtime 效能。 
          設定 compilation debug="true" 會將偵錯符號 (.pdb 資訊) 插入編譯的網頁。
          這樣將會建立較大的檔案並使執行速度變慢。
          一般只在偵錯時將這個值設為 true,其他情況都設為 false。
          如需詳細資訊,請參閱
          偵錯 ASP.NET 檔案相關的文件。
    -->
    <compilation 
         defaultLanguage="c#"
         debug="true"
    />

    <!--  自訂錯誤訊息
          設定 customErrors mode="On" 或 "RemoteOnly" 來啟用自訂錯誤訊息,"Off" 則為停用。 
          請對每個您要處理的錯誤,加入相對應的 <error> 標記。

          "On" 永遠顯示自訂 (易讀) 訊息。
          "Off" 永遠顯示詳細的 ASP.NET 錯誤資訊。
          "RemoteOnly" 僅顯示自訂 (易讀) 訊息給不在區域 Web 伺服器上的使用者。
           針對安全性目的,建議您使用這項設定, 
           這樣子您就不會將應用程式的詳細資訊顯示給遠端用戶端。
    -->
    <customErrors 
    mode="RemoteOnly" 
    /> 

    <!--  驗證 
          這個區段將設定應用程式的驗證原則。可能的模式包括 "Windows"、
          "Forms"、"Passport" 與 "None"

          "None" 沒有執行任何的驗證。 
          "Windows" IIS 會根據其針對應用程式所做的設定來執行驗證 (基本、摘要式或整合式 Windows 驗證) 
           IIS 的匿名存取功能必須停用。 
          "Forms" 提供自訂表單 (網頁) 讓使用者輸入他們的憑證, 
           然後在應用程式中驗證其憑證。使用者憑證 Token 儲存在 Cookie 中。
          "Passport" 驗證是經由 Microsoft 所提供的中央驗證服務而執行,
           此中央驗證服務可替成員網站提供單一登入與核心設定檔服務。
    -->
    <authentication mode="Windows" /> 

	<!--  授權 
          這個區段將設定應用程式的授權原則。您可以允許或拒絕不同使用者或角色存取應用程式資源。
          萬用字元: "*" 代表所有的人、"?" 代表匿名 (未驗證的) 使用者。
    -->

    <authorization>
        <allow users="*" /> <!-- 允許所有使用者 -->
            <!--  <allow     users="[使用逗號分隔的使用者清單]"
                             roles="[使用逗號分隔的角色清單]"/>
                  <deny      users="[使用逗號分隔的使用者清單]"
                             roles="[使用逗號分隔的角色清單]"/>
            -->
    </authorization>

    <!--  應用程式層級追蹤記錄
          應用程式層級追蹤啟用應用程式中每一頁面的追蹤記錄檔輸出。
          設定 trace enabled="true" 將啟用應用程式追蹤記錄。如果 pageOutput="true",追蹤資訊將顯示
          在每一頁面的下方。此外,您也可以從 Web 應用程式的根目錄透過瀏覽 "trace.axd" 頁面的方式來檢視
          應用程式的追蹤記錄檔。
    -->
    <trace
        enabled="false"
        requestLimit="10"
        pageOutput="false"
        traceMode="SortByTime"
		localOnly="true"
    />

    <!--  工作階段狀態設定
          根據預設,ASP.NET 會使用 Cookie 來識別哪些要求是屬於某個特定工作階段。
          如果無法使用 Cookie,您也可以將工作階段識別項加入到 URL 來追蹤工作階段。
          若要停用 Cookie,請設定 sessionState cookieless="true"。
    -->
    <sessionState 
            mode="InProc"
            stateConnectionString="tcpip=127.0.0.1:42424"
            sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
            cookieless="false" 
            timeout="20" 
    />

    <!--  全球化設定
          此區段用來設定應用程式全球化選項。
    -->
    <globalization 
            requestEncoding="utf-8" 
            responseEncoding="utf-8" 
   />
   
 </system.web>

</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions