System.Web.UI.WebControls.SessionParameter Class

Binds the value of a session variable to a parameter object.

See Also: SessionParameter Members


public class SessionParameter : Parameter


A SessionParameter object is typically used in order to include the value of an System.Web.SessionState.HttpSessionState variable in the Where clause of a database query. The SessionParameter.SessionField property identifies the session variable from which the System.Web.UI.WebControls.SessionParameter retrieves a value.


Controls that bind data to a parameter by using a System.Web.UI.WebControls.SessionParameter object might throw an exception if the specified session variable is not set. To avoid this error (where appropriate), set the Parameter.DefaultValue property.


Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions:
Since: .NET 2.0