WebSession.Cookies.Set

From Real Software Documentation

Jump to: navigation, search
Method

WebSession.Cookies.Set ( Name as String, Value As String [, Expiration As Date, Domain As String, Path As String] )

Creates the cookies with the values passed. If Expiration is not passed, the cookie will expire when the user quits their browser. Domain and Path are optional.

Example

This example sets a cookie called "UserName" to the value in the userName string:

Dim userName As String = "TestUser"
Session.Cookies.Set("UserName", userName)

See Also

WebSession.Cookies.Count, WebSession.Cookies.NameAtIndex, WebSession.Cookies.Remove, WebSession.Cookies.Value

Personal tools