Export (0) Print
Expand All

RouteCollectionExtensions.GetResourceRouteName Method

Adds a name to the routes to enable RESTful routing of requests to specified controller.

Namespace:  Microsoft.Web.Mvc.Resources
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

public static string GetResourceRouteName(
	this Controller controller,
	string controllerName,
	ActionType actionType
)

Parameters

controller
Type: System.Web.Mvc.Controller
The controller.
controllerName
Type: System.String
The string controller name.
actionType
Type: Microsoft.Web.Mvc.Resources.ActionType
The action type.

Return Value

Type: System.String
A string name to add.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Controller. When you use instance method syntax to call this method, omit the first parameter. For more information, see http://msdn.microsoft.com/en-us/library/bb384936.aspx or http://msdn.microsoft.com/en-us/library/bb383977.aspx.
Show:
© 2014 Microsoft