Active Server Pages error 'ASP 0141'

T

THE BIG MAN

I am getting the errror Active Server Pages error 'ASP 0141'

Page Command Repeated

/contactform.asp, line 12

The @ command can only be used once within the Active Server Page.
Anybody know why?
<%
Dim myMail, myBody
myBody ="Name: "& request.form("name") & vbcrlf & "company: "& vbcrlf
& request.form ("company") & vbcrlf & "telephone: "& vbcrlf &
request.form ("telephone") & vbcrlf & "email: "& vbcrlf & request.form
("email") & vbcrlf & "information: "& vbcrlf & request.form
("information")
Set myMail = Server.CreateObject ("CDONTS.NewMail")
myMail.From = request.form("email")
myMail.To = "(e-mail address removed)"
myMail.Subject = "Customer Contact"
myMail.Body = myBody
myMail.Send
set myMail=nothing

Response.Redirect("thanks.html")
%>
 
T

Tom B

Presumably at the top of your page you'll have
<%@ Language=VBScript%>
if you have an include that also has that, then you've used it more than
once.
 
R

Rob Greene

This can happen when you code contains a <% @Language=VBScript %> and you
also have service side includes, which also contain this code. I don't
think it's related to the '@' in your email address.

Reference: PRB: Error 0x80004005 When You View ASP Page in Browser
http://support.microsoft.com/?id=307190


-rwg
 
T

THE BIG MAN

Thanks for the help but i am still getting the error I changed the
code to this.

<body>
<%@LANGUAGE="VBSCRIPT" %>
Dim myMail, myBody
myBody ="Name: "& request.form("name") & vbcrlf & "company: "& vbcrlf
& request.form ("company") & vbcrlf & "telephone: "& vbcrlf &
request.form ("telephone") & vbcrlf & "email: "& vbcrlf & request.form
("email") & vbcrlf & "information: "& vbcrlf & request.form
("information")
Set myMail = Server.CreateObject ("CDONTS.NewMail")
myMail.From = request.form("email")
myMail.To = "(e-mail address removed)"
myMail.Subject = "Customer Contact"
myMail.Body = myBody
myMail.Send
set myMail=nothing

Response.Redirect("thanks.html")
%>
It's still not working!
 
T

THE BIG MAN

No I posted the entire error message. I am using the following code
for the form. <form name="form1" method="post"
action="/contactform.asp">
<table width="100%" border="0"
cellspacing="5" cellpadding="5">
<tr>
<td width="27%">Name</td>
<td width="73%"><input name="name"
type="text" id="name" size="60"></td>
</tr>
<tr>
<td>Company</td>
<td><input name="company" type="text"
id="company" size="60"></td>
</tr>
<tr>
<td>Telephone number </td>
<td><input name="telephone" type="text"
id="telephone" size="60"></td>
</tr>
<tr>
<td>Email address </td>
<td><input name="email" type="text"
id="email" size="60"></td>
</tr>
<tr>
<td>Further Information </td>
<td><textarea name="information"
cols="60" rows="5" id="information"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Submit"
value="Submit"></td>
</tr>
</table>
<p>&nbsp;</p>
</form>
I am using Dreamweaver and there is no server side include on the
page.
 
T

THE BIG MAN

Could somone test the code for me. I have no idea how to fix this. The
code for the two pages is in my posts.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top