Hi,
I have a Flash file which has a form which will post the fields to an ASP.NET file which will send the email (the flash code is on the main time line and not on a button). The problem I have is once the email is sent a new browser window is opened with the contents of the aspx output. The email is delivered however I don't want the output to be displayed. Is there a way to avoid the output to be displayed?
Here is the way I post the flash form:
send_mc.onRelease = function() {
videoData = new LoadVars();
videoData.mail_to= email.text;
videoData.mail_from = email2.text;
videoData.mail_data = email3.text;
videoData.location = 'flash_form';
videoData.send("Mailer.asp
x", "", "post");
};
This is how my Mailer.aspx looks (single line):
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Mailer.aspx.cs
" Inherits="Project.Mailer" %>
And this is my Mailer.aspx.cs's PageLoad since that's where I handle the mailing:
protected void Page_Load(object sender, EventArgs e)
{
HttpRequest rq = Request;
string loc = Request.Form["location"];
if (loc == null)
{
Response.Write("_root.Mail
.EmailStat
us=Error - An error has occurred");
return;
}
else
{
if (loc.Equals("flash_form"))
{
string from = Request.Form["mail_from"];
string to = Request.Form["mail_to"];
string contents= Request.Form["mail_datal"]
;
string title = "New flash Email";
if (MailHelper.sendMail(from,
to, title, contents, ""))
{
Response.Write("_root.Mail
.EmailStat
us=Complet
e - Successful submission");
}
else
{
Response.Write("_root.Mail
.EmailStat
us=Error - An error has occurred");
}
}
else
{
Response.Write("_root.Mail
.EmailStat
us=Error - An error has occurred");
}
}
}
When the flash sends the post. I ge the "_root.Mail.EmailStatus=..
.." message displayed in a new Tab which I don't want. Please help me with this issue.
Thanks,
Miklos
Start Free Trial