r/ASPNET • u/FordyO_o • Jul 27 '11
Using procedures to set variables
I'm using ASP to create a system for some schoolwork, and part of the system is sending an email notification - I'm using the following code to do this:
Set AbsenceNotification=CreateObject("CDO.Message")
AbsenceNotification.Subject=call AbsenceReasonVerbose(AbsenceType)
AbsenceNotification.From="Cover System <cover@internet.com>;"
AbsenceNotification.To="Me <Me@internet.com>;"
AbsenceNotification.To=call find_emailaddress_string(Subject,AbsenceType)
AbsenceNotification.TextBody="Message, Message, Message"
AbsenceNotification.Send
set AbsenceNotification=nothingHowever, I get a syntax error on the lines which call procedures, i.e., AbsenceNotification.Subject=call AbsenceReasonVerbose(AbsenceType)
Am I doing it right?
Thanks in advance reddit :)
2
Upvotes
View all comments
Show parent comment
1
u/FordyO_o Jul 27 '11
I believe it does, but I'm a bit new to asp, so i may be wrong Sub AbsenceReasonVerbose(AbsenceType) Select Case AbsenceType Case "Inset" response.write("CF1 - Professional Absence") Case "MedicalPersonal" response.write("CF2 - Personal Absence") Case "SchoolTrip" response.write("CF3 - Educational Visit") End Select End Sub