DynamicDataRoute(String) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
透過指定的 URL 模式初始化該類別的新實例 DynamicDataRoute 。
public:
DynamicDataRoute(System::String ^ url);
public DynamicDataRoute(string url);
new System.Web.DynamicData.DynamicDataRoute : string -> System.Web.DynamicData.DynamicDataRoute
Public Sub New (url As String)
參數
- url
- String
網址的模式。
備註
通常,你會用替換參數來指定動態資料將建立的網址。 例如,如果你傳遞字串「{table}/{action}」,當你使用 ListDetails 動作查看 Product 資料表時,結果會是 URL「~/Products/ListDetails.aspx」。
不需要使用替換參數。 你可以傳遞「Table/DynamicData」這個字串,這樣就會產生「~/Table/DynamicData.aspx」。 你可以將「MyPageName」傳入,產生「~/MyPageName.aspx」。 動態資料不依賴網址來判斷資料表與動作資訊。