Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

asp.net and Flash and .htmlText

COW Forums : Adobe Flash

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
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);
}
}

Here is the trace value:

formID=eventNews&eventNews%5Ftxt=%3CTEXTFORMAT%20LEADING%3D%222%22%3E%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20FACE%3D%22arial%22%20SIZE%3D%2214%22%20COLOR%3D%22%23000000%22%20LETTERSPACING%3D%220%22%20KERNING%3D%220%22%3E%3CB%3EJust%20add%20new%20information%20in%20here%2E%3C%2FB%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FTEXTFORMAT%3E%3CTEXTFORMAT%20LEADING%3D%222%22%3E%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20FACE%3D%22arial%22%20SIZE%3D%2214%22%20COLOR%3D%22%23000000%22%20LETTERSPACING%3D%220%22%20KERNING%3D%220%22%3E%3CB%3E%20%20%20%20%20It%20will%20format%20as%20you%20type%20it%20in%2E%3C%2FB%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FTEXTFORMAT%3E%3CTEXTFORMAT%20LEADING%3D%222%22%3E%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20FACE%3D%22arial%22%20SIZE%3D%2214%22%20COLOR%3D%22%23000000%22%20LETTERSPACING%3D%220%22%20KERNING%3D%220%22%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FTEXTFORMAT%3E%3CTEXTFORMAT%20LEADING%3D%222%22%3E%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20FACE%3D%22arial%22%20SIZE%3D%2214%22%20COLOR%3D%22%23000000%22%20LETTERSPACING%3D%220%22%20KERNING%3D%220%22%3EDecember%2012th%2C%202007%2E%20%20%20%20%20%20This%20is%20a%20new%20day%2E%20%20Welcome%20everyone%21%3C%2FFONT%3E%3C%2FP%3E%3C%2FTEXTFORMAT%3E%3CTEXTFORMAT%20LEADING%3D%222%22%3E%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20FACE%3D%22arial%22%20SIZE%3D%2214%22%20COLOR%3D%22%23000000%22%20LETTERSPACING%3D%220%22%20KERNING%3D%220%22%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FTEXTFORMAT%3E%3CTEXTFORMAT%20LEADING%3D%222%22%3E%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20FACE%3D%22arial%22%20SIZE%3D%2214%22%20COLOR%3D%22%23000000%22%20LETTERSPACING%3D%220%22%20KERNING%3D%220%22%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FTEXTFORMAT%3E

I am writing to a text file.





Respond to this post   •   Return to posts index

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()

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]