|
 |
pro_vb_dotnet thread: XML and File Upload
Message #1 by "Rob" <rob@t...> on Sat, 2 Mar 2002 22:47:21
|
|
Ok we have a voice application that works like this. You call, answer the
questions, and hang up. A wav file is created of your answers and saved.
Simple enough. At least with classic ASP. Now we want to do it in .NET.
Problem is I can not get the native upload of ASP.NET to access to the
file. I have posted the code below. I am not an XML guru by any meaning
of the word. That is all done by someone else. So what I need to know is
how in the heck do I get this file to upload with .NET? Currently I get
an error that says "The name file is not declared". The name of the file
is welcome.asp. Thanks in advance.
Rob
- <form>
- <record name="file" beep="true" maxtime="10s" finalsilence="4000ms"
type="audio/wav" modal="true" dtmfterm="true">
<prompt>At the beep, please record a message.</prompt>
- <filled mode="all">
<submit next="welcome.aspx?mssg=YES" method="post"
enctype="multipart/form-data" namelist="file" />
</filled>
</record>
</form>
<%
If request.querystring("mssg") <> "" then
Dim filename as string
filename = file.postedfile.filename
file.postedFile.SaveAs (Server.MapPath("myfiles") & "/" &
filename)
Dim smtpMssg AS new MailMessage
smtpMssg.From = "rob@t..."
smtpMssg.To = "rob@t..."
smtpMssg.Subject = "WAV"
smtpMssg.Body = "New WAV file has been posted " & filename
SmtpMail.Send(smtpMssg)
End If
%>
|
|
 |