DynamicDataRoute(String) 构造函数
定义
使用指定的 URL 模式初始化 DynamicDataRoute 类的新实例。Initializes a new instance of the DynamicDataRoute class by using the specified URL pattern.
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
URL 的模式。The pattern for the URL.
注解
通常,使用替换参数指定动态数据将创建的 Url。Typically, you specify the URLs that Dynamic Data will create by using substitution parameters. 例如,如果传递字符串 "{table}/{action}",则在使用 ListDetails 操作查看 Product 表时,结果将是 URL "~/Products/ListDetails.aspx"。For example, if you pass the string "{table}/{action}", the result would be the URL "~/Products/ListDetails.aspx" when you view the Product table by using the ListDetails action.
不需要使用替换参数。Using substitution parameters is not required. 可以传递字符串 "Table/DynamicData",这会产生 " ~ /Table/DynamicData.aspx"。You could pass the string "Table/DynamicData", which would produce "~/Table/DynamicData.aspx". 可以传递 "MyPageName" 以生成 " ~ /MyPageName.aspx"。You could pass "MyPageName" to produce "~/MyPageName.aspx". 动态数据不依赖于 URL 来确定表和操作信息。Dynamic Data does not rely on the URL to determine table and action information.