471,330 Members | 1,132 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

How to receive the xml file from client-side(javascript,i usejQuery)?

JUN
Sends an xml document as data to the server. By setting the
processData option to false, the automatic conversion of data to
strings is prevented.

code from jQuery documentation

var xmlDocument = [create xml document];
$.ajax({
url: "save.aspx",
processData: false,
data: xmlDocument,
success: handleResponse
});

Now,in server script, how do i read the xmlDocument and save a file.my
code like this,but it can't work.

private void Page_Load(object sender, System.EventArgs e){
Stream stream = Request.InputStream;
XmlDocument doc = new XmlDocument();
try
{
doc.Load(stream); // it will goto catch
doc.Save(Server.MapPath("bbbbbbbbbbbbbbbbbbbbb.xml "));
}
catch
{
}

}

Thanks a lot. it's very urgent.
Aug 11 '08 #1
0 773

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Alfredo Magallón Arbizu | last post: by
11 posts views Thread by TJM | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.