Partager via


TeamFoundationRequestContext.SetSessionValue Method

SetSessionValue is used to add a name/value to the current requests session.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Overridable Function SetSessionValue ( _
    sessionKey As String, _
    sessionValue As String _
) As Boolean
public virtual bool SetSessionValue(
    string sessionKey,
    string sessionValue
)
public:
virtual bool SetSessionValue(
    String^ sessionKey, 
    String^ sessionValue
)
abstract SetSessionValue : 
        sessionKey:string * 
        sessionValue:string -> bool  
override SetSessionValue : 
        sessionKey:string * 
        sessionValue:string -> bool
public function SetSessionValue(
    sessionKey : String, 
    sessionValue : String
) : boolean

Parameters

  • sessionValue
    Type: System.String

    Value to be associated with this session key.

Return Value

Type: System.Boolean
True if the value was saved to the session. False if sessions are not supported or the value wasn't saved.

.NET Framework Security

See Also

Reference

TeamFoundationRequestContext Class

Microsoft.TeamFoundation.Framework.Server Namespace