Hi,
How can I create a cookie in a windows application not in asp. This is the code I already have (the "System.Web" library have to be added from the Project/Add References:
Imports System.Web
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Dim myCookie1 As New HttpCookie("Coordenadas")
'myCookie1("CordX") = TextBox1.Text
'myCookie1("CordY") = TextBox2.Text
Dim myTextWriter As TextWriter
Dim Response As New HttpResponse(myTextWriter)
'Response.Write(myCookie1)
'Response.Cookies.Add(myCookie1)
Response.Cookies("Coordenadas")("CordX") = TextBox1.Text
Response.Cookies("Coordenadas")("CordY") = TextBox2.Text
End Sub
End Class
Enter your message below
Sign in or Join us (it's free).