web 2.0

ASP Session & Object Value

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 = "webmaster@thaicreate.com"
mySession.To   = "member@thaicreate.com"
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

ASP Session & Object Value

.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.