Route::Url Property
Gets or sets the URL pattern for the route.
Assembly: System.Web.Routing (in System.Web.Routing.dll)
| Exception | Condition |
|---|---|
| ArgumentException | Any of the following:
|
| Exception | URL segments are not separated by a delimiter or a literal constant. |
When you assign a value to the Url property, the / character is interpreted as a delimiter when the URL is parsed. Use braces ({}) to define a variable that is referred to as a URL parameter. The value from the matching segment in the URL is assigned to the URL parameter. Any values in the Url property that are not enclosed in braces are treated as literal constants.
The ? character is not allowed in the Url property. Each URL segment must be separated by either a delimiter or literal constant. You can use {{ or }} as escape characters for a brace character.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.