|
-
Apr 26th, 2001, 03:49 AM
#1
Thread Starter
Hyperactive Member
-
Apr 26th, 2001, 06:05 AM
#2
Black Cat
Make sure the Button3_onclick() sub gets called (on the server side, not by clicking buttons on the client side).
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 26th, 2001, 06:51 AM
#3
Thread Starter
Hyperactive Member
i'm a newbie to asp ,
can you explain how to call the sub from the server side.
-
Apr 26th, 2001, 10:41 AM
#4
Black Cat
There aren't events in ASP like there are in VB. (There's a handful bases on server events). ASP processes code from the top of your code to the bottom. So to call a sub, just have it in the <%
Ex:
Code:
<%
Option Explicit
Response.Write "<html><body>" & vbcrlf
'write a word three times
WriteThreeTimes("Word")
Response.Write "</body></html>" & vbcrlf
Sub WriteThreeTimes(word)
Response.Write word & vbcrlf word & vbcrlf word & vbcrlf
End Sub
%>
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 26th, 2001, 10:51 AM
#5
Thread Starter
Hyperactive Member
what i'm doing now is as follows
sub button_click()
Page2.navigateURL("mail.asp")
end sub
---then the code for mail.asp is
<%@language=vbscript%>
<%
Set objSendMail = server.CreateObject("CDONTS.NewMail")
With objSendMail
.From = "[email protected]"
.To = "[email protected]"
.Subject = "Testing ASP cdonts"
.Body = "This is a test of sending email from ASP."
.Send
End with
Set objSendMail = Nothing
response.write "Your email has been sent."
%>
*****************************88
in theory this should work , as the mail routine is being called from the server side.
Unfortunately for me it still aint doing anything.
any ideas??
-
Apr 26th, 2001, 11:39 AM
#6
Black Cat
That looks okay to me. You not getting any errors, right? Are you just not getting the mail? Check the configuration of the SMTP service on your server, then make sure it can relay the mail.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|