本文整理汇总了VB.NET中System.Web.HttpCookie.HasKeys属性的典型用法代码示例。如果您正苦于以下问题:VB.NET HttpCookie.HasKeys属性的具体用法?VB.NET HttpCookie.HasKeys怎么用?VB.NET HttpCookie.HasKeys使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了HttpCookie.HasKeys属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: MyKeyNames
Dim MyCookieCollection As HttpCookieCollection
Dim MyCookie As HttpCookie
Dim MyKeyNames() As String
Dim MyValues() As String
Dim loop1 As Integer
MyCookieCollection = Request.Cookies
For loop1 = 0 To MyCookieCollection.Count - 1
MyCookie = MyCookieCollection(loop1)
If MyCookie.HasKeys Then
Dim MyCookieValues As NameValueCollection = _
New NameValueCollection(MyCookie.Values)
MyKeyNames = MyCookieValues.AllKeys
For Each KeyName As String In MyKeyNames
MyValues = MyCookieValues.GetValues(KeyName)
Next
End If
Next loop1