Click to See Complete Forum and Search --> : New to ASP


nampup
11-07-2005, 02:30 PM
I have a form written that's multiple choice and about 200 questions. Answers are all radio buttons, with "yes" "maybe" "no" options.

I need to take the first 100 questions and put it on one page and the second hundred and put it in another page. Now the problem is I need an asp.net script to post to, that will email the answers of both pages to an email address. Any help would be much appretiated!

Ubik
11-07-2005, 05:37 PM
This is what I use for asp VBScript. You might need to change the mail part, depending on your host, but contact your host, and they can tell you how to do the mail part.

<%
body=""
For Each item In request.form
if IsArray(item) Then
For Each i In item
body=body&item & ":" & Request.form(item) & VBcr & VBcr
Next
Else
body=body&item & ":" & Request.form(item) & VBcr & VBcr
End if
next
Set Mail = Server.CreateObject("SMTPsvg.Mailer") 'create an Asp mail component.
Mail.FromName = "Bob"
Mail.FromAddress= "something@example.com"
Mail.RemoteHost = "mail.relay.example.com"
Mail.AddRecipient "email address", "example@example.com"
Mail.Subject = "Form Results"
Mail.BodyText = body

%>
<p>Thank You...</p>
<%

if Mail.SendMail then
Response.Write "<p>Your "&request.form("PracticeArea")&" request has been sent.</p>"
else
Response.Write "<p>We&acute;re sorry, but there was an error processing your request. Error was " & Mail.Response &"</p>"
end if
%>

Bullschmidt
11-10-2005, 04:06 PM
You may want to do some searching at the following to see if there is something similar that can give you some ideas:

HotScripts.com
http://www.hotscripts.com

Planet Source Code
http://www.planet-source-code.com

Scripts.com
http://www.scripts.com