I'm taking my first attempt at setting a cookie in ASP.net. I have a drop down list that lists all users of the application. Once the user has made their selection from the drop down list, they have the option of clicking a checkbox. When they click the checkbox, I would like for the value of the dropdownlist to be saved as a cookie. I would like to use that value to set the default value of the drop down list. I'm not sure what kind of event to put my code in or even if the code is correct. I've pasted it below. Thank you for your help.
Dim currentofficer As DropDownList = DirectCast(FindControl("DropDownOfficer"), DropDownList)
If currentofficer.SelectedValue <> "All Officers" Then
Response.Cookies("PipelineCookie")("DefaultOfficer") = currentofficer.Text