asp.net.ph

Application.GetKey Method

System.Web Namespace   HttpApplicationState Class


Gets an HttpApplicationState object name by index.

[ VB ]
Public Function GetKey ( _
   ByVal index As Integer _
) As String

[ C# ]
public string GetKey (
   int index
);

[ C++ ]
public: String* GetKey (
   int index
);

[ JScript ]
public function GetKey (
   index : int
) : String;

Parameters

index
The index of the application state object.

Return Value

The name under which the application state object was saved.

Example

The following example returns the names of all the objects in the application state collection and stores the names in a string array.

int i;
String [ ] stateVars = new String [ Application.Count ];

for ( i = 0; i < Application.Count; i++ ) {
   stateVars [ i ] = Application.GetKey ( i );
}
  C# VB JScript

See Also

HttpApplicationState Members Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note