Link to home
Start Free TrialLog in
Avatar of boydicus
boydicus

asked on

.asp pages not processing

I am trying to create a multi-page form.  

I made the first page with a number of fields.  The form action is set to point to page2.asp.  I understand that page2 must have an asp extension for this to work.  

I made the page2.asp capture the data from the first page using a line like this for each field on the first page:
    <input name="comments" type="hidden" id="contact" size="50" value="<%=Request.Form("comments")%>">

I would like page2.asp to capture some more data in fields as well as process a file upload.  The goal is to get data from both forms emailed to an address and to have a file uploaded at the same time.  

When I test it out, the first page works: I am delivered to page2.asp as I would expect.   However, when I hit submit on page2.asp, the page just flashes and reappears.  No processing seems to happen, the file is not uploaded and the email is not sent.  If I rename the page to .htm and try it on its own, it does process fine.  

Somehow, changing the extension to .asp seems to be causing this.  Is there something else I need to do to make this work?  I am completely new to .asp files, so please do not assume that I know anything :)

Thanks!
Avatar of coreybryant
coreybryant
Flag of United States of America image

Are you using FP forms to process this?  If so, FP forms will not use the email bot.  You will need to use CDOSYS, JMail, ASPMail, ASPEmail etc

-Corey
Avatar of AZweb
AZweb

Just to clarify what Corey is trying to say...

The FrontPage forms results bots used to make the forms pages work will only work on HTML pages. If you try and use them on ASP pages they will not work. Microsoft did this on purpose to close up possible security points.

To do what you want to do you will need to make your own code and use a different email sender such as CDOSYS, JMail, ASPMail etc.

Here is a link to MS that shows how to send a form to two email addresses by piggy-backing two forms and you may be able to tweak the idea to fit your needs. http://support.microsoft.com/?scid=kb;en-us;825454&spid=2514&sid=229

I've used a similar way to send form data to a database and then to an email address before.

Good Luck...
Avatar of boydicus

ASKER

AZweb, thank you for your detailed response.  I took a look at the MS article you refer to.  This is good to know about, but it isn't what I am trying to do.  The server processes both forms in series, so this won't work for me.  What I need is to have the second form be presented to the user as well.

Perhaps I should back up a bit.  What I want to do is to collect several text fields and have those sent to an email address.  I also want to provide for a file to be uploaded.  I was planning to do this with one form to collect the data, then a second to process the upload, although if there is a way to do this on a sinlge form that would be fine.

And now that I think about it, if there were a way to attach the file to the email that is sent, that would actually be most prefered of all.  

Can you tell me what the best way would be to go about doing this?

Thank you!
  -Boyd
SOLUTION
Avatar of coreybryant
coreybryant
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I want to thank you guys both for your help on this.  I can see there is a heck of a lot to learn here.

I was able to fix this by taking a step back and looking at what I was trying to do.  I was making it a lot harder than it needed to be.  All I needed to do was make a single page form using the upload component, and then add a bunch of text fields into that form.  Now the upload happens and I get my email.  Perfect!

Thank you.