I wonder what the default value is when I do not set the cookie
expiration time.
I know that cookies usually stay on the web without leaving the site.
So if you do not keep up with the site, will the cookie value stay
alive forever? Several hours a few months even years??
Unless an expiry date is given to the cookie, they will remain for as long as the active session on that particular set. The default IIS setting is 20 minutes I believe, but can vary upon the IIS settings. Keep in mind that they do not exist on the server (unless you're referring to Sessions) but rather on the clients machine, which they can clear whenever.
I know that the expiration time of cookies is only for writing, so it
can not be read by the development team.
you can both read from a cookie, as well as write to a cookie. This is independent of whether the cookie is set on the client or the server side.
I also heard that if you do not set an expiration time like
JavaScript, you will lose cookies after midnight, but I wonder if this
is true. If so, asp's cookies will expire after midnight.
Nope, they are set either bu setting an expiry time on the cookie or the default session timeout setting in IIS