There are so many instances that I need create a cookie in javascript and access the same cookies from asp.net. Any time you create a control that will need to set a cookie from the server you not only have to do a postback, but webserver controls add more over head to your page.
For example, I have a lot of links that I have to store state information every time one is clicked. So I use the LinkButton. I discovered however, the LinkButton adds much more overhead to your page than just ordinary HTML anchor tags. This adds to the time it takes the server to render the page.
But if I could set cookies in javascript then read the cookie on the server in asp.net, I save on postbacks, page overhead and can take advantage of the use of HTML controls, which are much lighter, instead of server controls.
For example, I have a lot of links that I have to store state information every time one is clicked. So I use the LinkButton. I discovered however, the LinkButton adds much more overhead to your page than just ordinary HTML anchor tags. This adds to the time it takes the server to render the page.
But if I could set cookies in javascript then read the cookie on the server in asp.net, I save on postbacks, page overhead and can take advantage of the use of HTML controls, which are much lighter, instead of server controls.