asp.net and Flash and .htmlText
by luthervondude
on
Mar 16, 2007 at 12:27:16 pm
For some reason when I try to send .htmlText out of Flash it never makes it to the .aspx page. Here is my submit button code:
on(press)
{
submitDataToTextfile();
//First we write a function to... well the name says it all.
function submitDataToTextfile() {
//this is our sending loadVars object
submittedData = new LoadVars();
responseData= new LoadVars();
//here we make a variable "inputData" and as value we set it to the value of the inputData textfield.
submittedData.eventNews_txt = _root.eventNews_txt.htmlText;
submittedData.formID = "eventNews";
//finally sendAndLoad to the aspx
submittedData.sendAndLoad("newsProcessing.aspx", submittedData, "post");
trace(submittedData);
}
}
Re: asp.net and Flash and .htmlText by luthervondude on Mar 16, 2007 at 6:41:13 pm
In case anyone else would find this useful... here is the asp.net solution to writing .htmlText to a text file.
Request.Form("formID") = "eventNews" Then
Dim objWriter As StreamWriter
objWriter = File.CreateText(Server.MapPath("/textFiles/event-news.txt"))
Dim strTest As String = Server.HtmlEncode(Request.Form("eventNews_txt")) <--------- Server.HtmlEncode is the important part
strTest = "events=" & strTest
objWriter.Write(strTest)
objWriter.Close()