Can somebody tell me how to set a cookies & how to retrive cookie values on the other page???? Why cookies are used???? If we have to pass info from one page to another,for dat we can use QuerySTring,y Cookies???
A cookie is a small bit of text that accompanies requests and pages as they go between the Web server and browser. The cookie contains information the Web application can read whenever the user visits the site.
A cookie is a small peace of information stored in client system in a plain format. cookies r two type one in inmemory cooke and second one is persistent cookie. inmemory cooke has no expiry date. these cookies r there in a system when user browsing the website. when user close the browser inmemory cookies r deleted. persisten cookie
has expiry date and time, that means we can delete the cookie programmatically. persistent cookie will remain in the memory even after user close the browser. By default persisten cookie will be in memory for 50 years.
declaration of cookie:
Httpcookie obj = new Httpcooki();
obj.value="somthing u want";
fetching the cookie in different pages: