Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim al As New ArrayList()
For i = 0 To Request.Cookies.Count - 1
al.Add(Request.Cookies(i))
Next
gvAllCookies.DataSource = al
gvAllCookies.DataBind()
End Sub
แต่ไม่รู้ไงมานerrorบรรทัด
gvAllCookies.DataSource = al
gvAllCookies.DataBind()
ไม่รู้ว่าเพราะไรหรือมมานไม่รู้จัก gvAllCookies
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim al As New ArrayList()
For i = 0 To Request.Cookies.Count - 1
al.Add(Request.Cookies(i))
Next
Dim gvAllCookies As GridView = New GridView() 'ถ้ายังไม่ประกาศ gridview
gvAllCookies.DataSource = al
gvAllCookies.DataBind()
Page.Form.Controls.Add(gvAllCookies) 'ถ้ายังไม่ประกาศ gridview
End Sub