IT Community - Software Programming, Web Development and Technical Support

Pass Complex Data from flash to .Net or any other server side script

This is a discussion on Pass Complex Data from flash to .Net or any other server side script within the Flash Actionscript Programming forums, part of the Web Development category; Hi, I want to store array of values as an xml file using Flash. I know the .Net can generate ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Flash Actionscript Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 09:40 PM
aramesh aramesh is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 71
aramesh is on a distinguished road
Default Pass Complex Data from flash to .Net or any other server side script

Hi,
I want to store array of values as an xml file using Flash. I know the .Net can generate an xml file, if they got such values. My problem is how to send the array of values to .Net.

Using "sendAndLoad" method we can pass only the limited or known length of data. I want to send unknown length of values. Is there possible to send an array of values from flash to .Net.

Help Please.

Thanks in Advance
A.Ramesh

Last edited by aramesh : 02-26-2008 at 08:35 PM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-26-2008, 08:51 PM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: Pass Complex Data from flash to .Net or any other server side script

Hi,
It is possible to send complex data from Flash to .Net as an xml using "XML" objects sendAndLoad method.

sendAndLoad (XML.sendAndLoad method)

public sendAndLoad(url:String, resultXML:XML) : Void

Encodes the specified XML object into an XML document, sends it to the specified URL using the POST method, downloads the server's response, and loads it into the resultXMLobject specified in the parameters. The server response loads in the same manner used by the XML.load() method.

When the sendAndLoad() method is executed, the XML object property loaded is set to false. When the XML data finishes downloading, the loaded property is set to true if the data successfully loaded, and the onLoad event handler is invoked. The XML data is not parsed until it is completely downloaded. If the XML object previously contained any XML trees, those trees are discarded.

So using the complex data create it in an xml format. Then send it to .Net or any other server side script using xml.sendAndLoad object.
__________________
The OXYGEN
Delivers edgy, intelligent Technology to all...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-05-2008, 03:09 AM
aramesh aramesh is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 71
aramesh is on a distinguished road
Default Re: Pass Complex Data from flash to .Net or any other server side script

Hi,
Thanks a lot for your response. I tried it using xml.sendAndLoad in flash. But i dont know how to get the data in .net. Can you send me a sample for this. This will really helpful for me.

Advance thanks.

Regards
A.Ramesh
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-05-2008, 09:04 PM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: Pass Complex Data from flash to .Net or any other server side script

Hi,
This is the code you should use in .Net. This will get the xml data and save it as an test.xml file in the readwrite folder.

protected void Page_Load(object sender, EventArgs e)
{
string filePath = Server.MapPath("readwrite/test.xml");
//string filePath = @"D:\temp\test.xml";
Response.ContentType = "text/xml";
XmlDocument doc = new XmlDocument();
try
{
XmlTextReader reader = new XmlTextReader(Request.InputStream);
doc.Load(reader);
doc.Save(filePath);
reader.Close();
}
catch (Exception ex)
{
string msg = ex.Message;
}
}
__________________
The OXYGEN
Delivers edgy, intelligent Technology to all...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass the client's local time to a server side process itbarota HTML, CSS and Javascript Coding Techniques 1 02-20-2008 08:51 PM
How do I pass the client's local time to a server side process? shaalini HTML, CSS and Javascript Coding Techniques 0 01-20-2008 08:21 PM
Client side JavaScript and and Server side Java Script sathian HTML, CSS and Javascript Coding Techniques 2 11-09-2007 09:30 PM
difference between Client side JavaScript and and Server side Java Script? Sundaram HTML, CSS and Javascript Coding Techniques 1 09-05-2007 10:46 AM
should validation occur server side or client side?why? prasath ASP and ASP.NET Programming 1 07-19-2007 02:09 AM


All times are GMT -7. The time now is 02:21 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0