Taal

HttpHandlerActionCollection.IndexOf(HttpHandlerAction) Methode

Definitie

Hiermee haalt u de verzamelingsindex van het opgegeven HttpHandlerAction object op.

public:
 int IndexOf(System::Web::Configuration::HttpHandlerAction ^ action);
public int IndexOf(System.Web.Configuration.HttpHandlerAction action);
member this.IndexOf : System.Web.Configuration.HttpHandlerAction -> int
Public Function IndexOf (action As HttpHandlerAction) As Integer

Parameters

action
HttpHandlerAction

Het HttpHandlerAction object waarvoor de verzamelingsindex moet worden opgehaald.

Retouren

De waarde van de verzamelingsindex.

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u een index voor een HttpHandlerAction objectverzameling ophaalt.


// Get the specified handler's index.
HttpHandlerAction httpHandler2 = new HttpHandlerAction(
"Calculator.custom",
"Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler",
"GET", true);
int handlerIndex = httpHandlers.IndexOf(httpHandler2);

'Get the specified handler's index.
Dim httpHandler2 As System.Web.Configuration.HttpHandlerAction  = new HttpHandlerAction( _
"Calculator.custom", _
"Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler", _
"GET", _
true)
Dim handlerIndex As Integer = httpHandlers.IndexOf(httpHandler2)

Opmerkingen

Voordat u deze methode gebruikt, moet u een HttpHandlerAction object met de juiste naam en het juiste type identificeren. Vervolgens kunt u dit object gebruiken om de verzamelingsindex op te halen.

Van toepassing op