[jQuery] The server script how to read the data with XMLDocument?
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:
private void Page_Load(object sender, System.EventArgs e){
Stream stream = Request.InputStream;
XmlDocument doc = new XmlDocument();
try
{
doc.Load(stream);
doc.Save(Server.MapPath("bbbbbbbbbbbbbbbbbbbbb.xml"));
}
catch
{
}
}
thanks all