request.form

G

Guest

I'm using the following code in a confirmation page. It take the fields from
a form (a.html) and e-mails it. It works fine. My question is, it does not
seem to work with an asp page. (a.asp) It does not bring over the values if
the originating page is an asp page only works if it is an html. Must have
something to do with "request.form" How can I make it work with my asp page?

Thanks.

<%
Set objMail = Server.CreateObject("CDONTS.Newmail")
objMail.To = request.form ("recipient")
objMail.Subject = request.form ("subject")
objMail.From = request.form ("sender")
objMail.Body = request.form ("body")
objMail.Send
Set objMail = Nothing
%>
 
P

p c

It shodul work with both .html and .asp for the form. to identify the
problem, post the HTML code for your form.
 
R

Ronx

Does the .htm form use the FrontPage extensions to process the form data?
If so, the confirmation page will never work with an .asp page, since the
confirmation fields require the extensions to populate them, and .asp does
not use the extensions. You will have to create your own confirmation page
for the .asp pages.
If you are adding data to a database, then see
http://www.interlacken.com/winnt/tips/tipshow.aspx?tip=54
for an example using CDO (not CDONTS)
 

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

Top