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




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

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

You can help support asp.net.ph