469,271 Members | 1,009 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Active Server Pages error 'ASP 0141'

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 = "we*******@designprofessional.co.uk"
myMail.Subject = "Customer Contact"
myMail.Body = myBody
myMail.Send
set myMail=nothing

Response.Redirect("thanks.html")
%>
Jul 19 '05 #1
6 12037
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.

"THE BIG MAN" <al**********@yahoo.co.uk> wrote in message
news:e0**************************@posting.google.c om...
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 = "we*******@designprofessional.co.uk"
myMail.Subject = "Customer Contact"
myMail.Body = myBody
myMail.Send
set myMail=nothing

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

Jul 19 '05 #2
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

Jul 19 '05 #3
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 = "we*******@designprofessional.co.uk"
myMail.Subject = "Customer Contact"
myMail.Body = myBody
myMail.Send
set myMail=nothing

Response.Redirect("thanks.html")
%>
It's still not working!
Jul 19 '05 #4
Is there another code in the message, like an 8000* or 8004* number?

Jul 19 '05 #5
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.
Jul 19 '05 #6
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.
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by McKirahan | last post: by
1 post views Thread by Andrew | last post: by
20 posts views Thread by =?Utf-8?B?SnVzdGluIERvaA==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.