You need to set the expiration date of the cookie. You can do that in the web.config.
Code:
<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx"
protection="All"
timeout="20160"
name=".ASPXAUTH"
path="/"
requireSSL="false"
slidingExpiration="false"
defaultUrl="default.aspx"
cookieless="UseDeviceProfile"
enableCrossAppRedirects="false" />
</authentication>
</system.web>
Here, the timeout is set to 20,160 minutes, which is 2 weeks. Whenever the cookie is set with a second parameter of
true, this will set a persistent cookie with an expiration time of exactly two weeks from the time it was set.