I have a cookie saved to the user as follows...
Dim searchCookie As HttpCookie = New HttpCookie(\"SearchCriteria\")
searchCookie.Item(\"SearchText\") = FullSearc
You can use the URLEncode method.
Something like:
imports HttpContext.Current
...
Dim searchCookie As HttpCookie = New HttpCookie("SearchCriteria")
searchCookie.Item("SearchText") = Server.UrlEncode(FullSearchCriteria.SearchText)
searchCookie.Item("SearchType") = Server.UrlEncode(FullSearchCriteria.SearchType)
This is essential as only certain characters are allowed in cookies with characters such as ampersands breaking them.