T
Tony
Hi,
when i run this code below, i get the error:Compiler Error Message: BC30451:
Name 'check' is not declared.
but if i compile it in advance like this:aspnet_compiler -p
"c:\inetpub\wwwroot\resintra" -v / c:\compiled\resintra -f
or if i run it within Visual Web Developer (Cassini), in both cases it works
without error!!
Any idea?
Thanks T.
Public Class check
Public Shared Sub beh()
Dim cok As HttpCookie
Dim ja As String
Dim jv As String
cok = HttpContext.Current.Request.Cookies("ok")
ja = cok.Value
If ja <> "1" Then
jv = "<script language='javascript'>" _
& " alert('You must first registrate');" _
& " window.location.href='start.aspx';" _
& "</script>"
HttpContext.Current.Response.Write(jv)
End If
End Sub
End Class
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
check.beh()
when i run this code below, i get the error:Compiler Error Message: BC30451:
Name 'check' is not declared.
but if i compile it in advance like this:aspnet_compiler -p
"c:\inetpub\wwwroot\resintra" -v / c:\compiled\resintra -f
or if i run it within Visual Web Developer (Cassini), in both cases it works
without error!!
Any idea?
Thanks T.
Public Class check
Public Shared Sub beh()
Dim cok As HttpCookie
Dim ja As String
Dim jv As String
cok = HttpContext.Current.Request.Cookies("ok")
ja = cok.Value
If ja <> "1" Then
jv = "<script language='javascript'>" _
& " alert('You must first registrate');" _
& " window.location.href='start.aspx';" _
& "</script>"
HttpContext.Current.Response.Write(jv)
End If
End Sub
End Class
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
check.beh()