HttpContext.GetConfig(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
The recommended alternative is System.Web.HttpContext.GetSection in System.Web.dll. http://go.microsoft.com/fwlink/?linkid=14202
回傳目前 HTTP 請求的設定資訊。
public:
System::Object ^ GetConfig(System::String ^ name);
public object GetConfig(string name);
[System.Obsolete("The recommended alternative is System.Web.HttpContext.GetSection in System.Web.dll. http://go.microsoft.com/fwlink/?linkid=14202")]
public object GetConfig(string name);
member this.GetConfig : string -> obj
[<System.Obsolete("The recommended alternative is System.Web.HttpContext.GetSection in System.Web.dll. http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.GetConfig : string -> obj
Public Function GetConfig (name As String) As Object
參數
- name
- String
請求資訊的設定標籤。
傳回
若該區段不存在,則 ConfigurationSection指定為 , null 若執行時無法存取該區段,則為內部物件。 (使用前請將回傳物件投射到適當的配置類型。)
- 屬性
備註
方法 GetConfig 已被取代。 使用該 GetSection 方法取得目前 HTTP 請求的設定資訊。