ASP Session & Object Value This example asp code using Session and Object value.
ShotDev Focus:
- Session and Object
Example
asp_session_object.asp
<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Dim myMail
Dim objMyMail
Set myMail = Server.CreateObject("CDONTS.NewMail")
Set Session("objMyMail") = myMail
Set myMail = Nothing
'*** Use Session ***'
Dim mySession
Set mySession = Session("objMyMail")
mySession.From = "[email protected]"
mySession.To = "[email protected]"
mySession.Subject = "My Subject"
mySession.Body = "My Body & My Description"
mySession.Send
Response.write ("Mail Sending.")
Set mySession = Nothing
'*** End Use Session ***'
%>
</body>
</html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_session_object.asp
Screenshot
.
.
.


