Juan T. Llibre said:
Session and Trace are in System.Web.dll.
But here I am getting errors from my compile and I do reference
System.Web.Dll.
Here are the imports:
Imports System
Imports System.Web.UI
Imports System.Web.SessionState
Imports System.Web.Mail
Imports System.Data
Imports System.Data.SqlClient
System.Diagnostics.Trace
I assume that System.Web.SessionState is what I need for Sessions? I also
thought that System.Diagnostics.Trace were what I needed for trace.warn.
Also I assume that I need some vb.dll to use left and intstr. I am not even
going to look at the others if the sessions and trace aren't working.
http://msdn.microsoft.com/library/d...tml/frlrfsystemdiagnosticstraceclasstopic.asp
Shows trace as being System.diagnostics.trace (or am I reading it wrong).
The command and results are:
****************************************************************************
**********
C:\Inetpub\wwwroot\Development>makeemailclass
C:\Inetpub\wwwroot\Development>vbc /t:library emailClass.vb
/r:system.web.dll /r:system.data.dll /r:system.dll
Microsoft (R) Visual Basic .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322.2032
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
C:\Inetpub\wwwroot\Development\EmailClass.vb(20) : error BC30451: Name
'trace' i
s not declared.
trace.warn("inside SendTheEmail")
~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(44) : error BC30451: Name
'Left' is
not declared.
Left(request.path, InStrRev(request.path, "/") - 1)
~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(44) : error BC30451: Name
'request'
is not declared.
Left(request.path, InStrRev(request.path, "/") - 1)
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(44) : error BC30451: Name
'InStrRev
' is not declared.
Left(request.path, InStrRev(request.path, "/") - 1)
~~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(44) : error BC30451: Name
'request'
is not declared.
Left(request.path, InStrRev(request.path, "/") - 1)
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(45) : error BC30002: Type
'StreamRe
ader' is not defined.
Dim objStreamReader as StreamReader
~~~~~~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(48) : error BC30451: Name
'File' is
not declared.
If File.exists(MapPath("..\automail\mail.htm")) then
~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(48) : error BC30451: Name
'MapPath'
is not declared.
If File.exists(MapPath("..\automail\mail.htm")) then
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(49) : error BC30451: Name
'File' is
not declared.
objStreamReader = File.OpenText(MapPath("mail.htm"))
~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(49) : error BC30451: Name
'MapPath'
is not declared.
objStreamReader = File.OpenText(MapPath("mail.htm"))
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(58) : error BC30451: Name
'session'
is not declared.
Dim mailTo as String = session("email") & "?subject=Re: Your job
applica
tion for the position of " & session("jobTitle")
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(58) : error BC30451: Name
'session'
is not declared.
Dim mailTo as String = session("email") & "?subject=Re: Your job
applica
tion for the position of " & session("jobTitle")
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(62) : error BC30451: Name
'session'
is not declared.
message.Body = resumeTop & "<br>For the Position of: <b>" &
session("job
Title") & "</b><br><br>"
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(63) : error BC30451: Name
'request'
is not declared.
message.Body = message.Body & "For Applicant: " & "<a href='http://"
& r
equest.ServerVariables("SERVER_NAME") & "/" & URLPath &
"/displayAppResumeEE.as
px?JobID=" & session("JobID") & "'>" & session("firstName") & " " &
session("las
tName") & "</a>" & "<br>"
~
~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(63) : error BC30451: Name
'session'
is not declared.
message.Body = message.Body & "For Applicant: " & "<a href='http://"
& r
equest.ServerVariables("SERVER_NAME") & "/" & URLPath &
"/displayAppResumeEE.as
px?JobID=" & session("JobID") & "'>" & session("firstName") & " " &
session("las
tName") & "</a>" & "<br>"
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(63) : error BC30451: Name
'session'
is not declared.
message.Body = message.Body & "For Applicant: " & "<a href='http://"
& r
equest.ServerVariables("SERVER_NAME") & "/" & URLPath &
"/displayAppResumeEE.as
px?JobID=" & session("JobID") & "'>" & session("firstName") & " " &
session("las
tName") & "</a>" & "<br>"
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(63) : error BC30451: Name
'session'
is not declared.
message.Body = message.Body & "For Applicant: " & "<a href='http://"
& r
equest.ServerVariables("SERVER_NAME") & "/" & URLPath &
"/displayAppResumeEE.as
px?JobID=" & session("JobID") & "'>" & session("firstName") & " " &
session("las
tName") & "</a>" & "<br>"
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(64) : error BC30451: Name
'session'
is not declared.
message.Body = message.Body & "Email: " & "<a href=""mailto:" &
mailTo &
""">" & session("email") & "</a>." & "<br><br>"
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(65) : error BC30451: Name
'request'
is not declared.
message.Body = message.Body & "<a href='http://" &
request.ServerVariabl
es("SERVER_NAME") & "/" & URLPath &
"/displayJobApplicants.aspx?referenceCode="
& session("ReferenceCode") & "&CommandName=Resumes&PositionID=" &
session("Posit
ionID") & "'>See all applicants for this postion</a>" & "<br><br>"
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(65) : error BC30451: Name
'session'
is not declared.
message.Body = message.Body & "<a href='http://" &
request.ServerVariabl
es("SERVER_NAME") & "/" & URLPath &
"/displayJobApplicants.aspx?referenceCode="
& session("ReferenceCode") & "&CommandName=Resumes&PositionID=" &
session("Posit
ionID") & "'>See all applicants for this postion</a>" & "<br><br>"
~~~~~~~
C:\Inetpub\wwwroot\Development\EmailClass.vb(65) : error BC30451: Name
'session'
is not declared.
message.Body = message.Body & "<a href='http://" &
request.ServerVariabl
es("SERVER_NAME") & "/" & URLPath &
"/displayJobApplicants.aspx?referenceCode="
& session("ReferenceCode") & "&CommandName=Resumes&PositionID=" &
session("Posit
ionID") & "'>See all applicants for this postion</a>" & "<br><br>"
C:\Inetpub\wwwroot\Development>copy emailClass.dll bin\emailClass.dll
1 file(s) copied.
C:\Inetpub\wwwroot\Development>
****************************************************************************
***********
Thanks,
Tom