Sridhar,
I just answered the same questions for Belle below...
MyCookie.Expires = Now.Add.Minutes(20)
And then make certain to use the forms authentication object's redirect:
FormsAuthentication.RedirectFromLoginPage(username .Text, false)
Setting the second parameter lets you specify if a cookie is persistent.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
<kr**************@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
I want my asp.net application to create a non persisitent cookie that
will timeout after 20 minutes.
I want the cookie to expire when the bowser is closed AND timeout if
the user has been inactive (sliding expiration)
How can I accomplish this?
If i set the expiration time on the cookie, it ceases to be non
persistent, and the user stays logged in if the browser was closed and
re-opened in under 20 minutes.
Thanks.