| |||||
HttpCookie.Expires PropertySystem.Web Namespace HttpCookie Class Sets or retrieves the expiration date and time for the cookie. [ VB ] Public Property Expires As DateTime [ C# ] public DateTime Expires {get; set;} [ C++ ] public: __property DateTime get_Expires ( ); public: __property void set_Expires ( DateTime ); [ JScript ] public function get Expires ( ) : DateTime; public function set Expires ( DateTime ); Property ValueThe time of day ( on the client ) at which the cookie expires. ExampleThe following example sets the expiration time of the cookie to 10 minutes from the current time. [ VB ] Dim dt As DateTime = DateTime.Now ( ) Dim ts As New TimeSpan ( 0,0,10,0 ) myCookie.Expires = dt.Add ( ts ) [ C# ] DateTime dt = DateTime.Now; TimeSpan ts = new TimeSpan ( 0,0,10,0 ); myCookie.Expires = dt.Add ( ts ); [ JScript ] var dt : DateTime = DateTime.Now var ts : TimeSpan = new TimeSpan ( 0,0,10,0 ) myCookie.Expires = dt.Add ( ts ) See Also |
| ||||
Check out related books at Amazon
© 2000-2008 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 aspxtreme