G
Guest
I have a CookieContainer full of Cookies.
I want to loop through the CookieContainer to display the cookies?
How can I do this.
I know how to loop through a CookieCollection and display the cookies.
How can I turn a CookieContainer into a CookieCollection?
I tried something like this:
Public Sub f_DisplayCookies(ByVal cc As Net.CookieContainer)
Dim cookie As Net.Cookie
Dim ccCookieCollection As Net.CookieCollection = CType(cc,
Net.CookieCollection)
For Each cookie In ccCookieCollection
'Display Cookie
next
End Sub
But I get an error message saying that I can not use CType to change the
data type from a CookieContainer to a CookieCollection?
Any insight would be greatly appreciated.
TIA.
I want to loop through the CookieContainer to display the cookies?
How can I do this.
I know how to loop through a CookieCollection and display the cookies.
How can I turn a CookieContainer into a CookieCollection?
I tried something like this:
Public Sub f_DisplayCookies(ByVal cc As Net.CookieContainer)
Dim cookie As Net.Cookie
Dim ccCookieCollection As Net.CookieCollection = CType(cc,
Net.CookieCollection)
For Each cookie In ccCookieCollection
'Display Cookie
next
End Sub
But I get an error message saying that I can not use CType to change the
data type from a CookieContainer to a CookieCollection?
Any insight would be greatly appreciated.
TIA.