H
hansiman
When I use the sub code below directly in the code behind page it
works. However, if I move the code into a sub and place the sub in a
class file I get a building error "Name 'Response' is not declared."
I figure it has to do with the imports .... but I have tried both
system.web.ui and a couple of others...
Please help.
/morten
Public Sub addCookie(ByVal sName As String, ByVal sValue As String,
ByVal dExpiry As DateTime)
Dim cookie As HttpCookie = New HttpCookie(sName)
cookie.Value = sValue
cookie.Expires = dExpiry
Response.Cookies.Add(cookie)
End Sub
works. However, if I move the code into a sub and place the sub in a
class file I get a building error "Name 'Response' is not declared."
I figure it has to do with the imports .... but I have tried both
system.web.ui and a couple of others...
Please help.
/morten
Public Sub addCookie(ByVal sName As String, ByVal sValue As String,
ByVal dExpiry As DateTime)
Dim cookie As HttpCookie = New HttpCookie(sName)
cookie.Value = sValue
cookie.Expires = dExpiry
Response.Cookies.Add(cookie)
End Sub