You're here: Snippet Directory » Microsoft .NET » ASP.NET (68)
Language:

Check for cookies

Language: English
Programming Language: VB.NET
Published by: Dennis Pallett [not registered]
Last Update: 5/9/2006
Views: 2424

Description

This code loops through the cookie object and displays all the cookies and their values. (Visual Basic.NET)

Code

1 <script language="vb" runat="server"> 2 Sub Page_Load(source As Object, e As EventArgs) 3 Dim nCookieCount As Int32 4 5 'check for cookie 6 For nCookieCount = 0 To Request.Cookies.Count - 1 7 Response.Write("Server " & Request.Cookies("server").Value & "<br><br>") 8 Next 9 End Sub 10 </script>

No comments avaiable

Add a comment

Name *  

Email (won't be displayed) *    

Website  

Comment *  

Sicherheitscode Security Code *    

RSS