Set/Get cookies

D

David

I have an ASP.Net site that uses a cookie to hold setting for the last
search criteria (entered in textBox, etc. fields. When I click the search
button, it sets the value of the cookie in VB code as part of the OnClick
event of that button. However, the cookie values are not set until Postback
so I am assuming that is why they are not available at the initial part of
Postback when the page is re-processed. How can I set the value of the
cookie before I leave the aspx page? Do I need to use JavaScript to do
that? Thanks.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,244
Latest member
cryptotaxsoftware12

Latest Threads

Top