compiler error BC30451 but not when pre-compiled

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()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top