解讀Web.config簡要配置說明_.Net教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!

      推薦:解析動態生成DataTable代碼
      privateDataTableCreateTable() { DataTabledt=newDataTable(dirName); #regiontablecolumn DataColumncolumnID=newDataColumn();//創建一列 columnID.DataType=System.Type.GetType(System.Int32);//數據類型 columnID.ColumnName=ID;//列名 columnID.

      <?xml version="1.0" standalone="yes"?>
      <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
      <!--配置全局變量--> 
        <appSettings>
      <add key="examstr" value="server=.;database=myweb_exam_db;uid=exam_login;pwd=xxd_examadmin"/> 
        </appSettings>
      <!--配置全局變量-->
      <!--網站系統配置--> 
        <system.web> 
          <!--上傳文件時提示訪問被拒絕,生成圖片文件等失敗文件夾沒有改寫權限--> 
          <identity impersonate="true"/> 
          <!--在客戶端顯示錯誤信息--> 
          <customErrors mode="Off" /> 
          <!--允許匿名訪問--> 
          <authorization> 
            <allow users="*" /> 
          </authorization> 
          <!--啟用跟蹤頁面--> 
          <trace enabled="true" requestLimit="1000" pageOutput="true" traceMode="SortByTime" localOnly="true" /> 
          <!--防止網頁亂碼--> 
          <globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2312"/> 
          <!--有兩個form時,用窗體提交時配置--> 
          <pages validateRequest="false" enableSessionState="true" enableViewState="true" enableEventValidation="false"/> 
          <!--設置上傳文件大小--> 
          <httpRuntime executionTimeout="300" maxRequestLength="102400" useFullyQualifiedRedirectUrl="false"/>
      <!-- Sessionid更新-->
      <sessionState mode="InProc" cookieless="false" regenerateExpiredSessionId="true" timeout="1" /> 
        </system.web>
      <!--網站系統配置-->
      </configuration>

      分享:解析標題太長用省略號來代替簡單辦法
      asp:TemplateField HeaderTemplate其他要求/HeaderTemplate ItemTemplate ahref=news22.aspx?id=%#Eval(id)%target=_blank%#Eval(Message).ToString().Length7?Eval(Message).ToString().Substring(0,7)+...:Eval(Message).ToString()%/a /Item

      來源:模板無憂//所屬分類:.Net教程/更新時間:2010-03-14
      相關.Net教程