PDA

View Full Version : Exporting data from Gridpanel to file



tanky65
May 22, 2012, 10:08 AM
Is there anybody who knows why the following request (xml in the example, but valid for every download file type request) works in the on-line example but locally [ this.Response.End() ] returns always a [BADRESPONSE: Unexpected token <] ?
Could it be releated with app/web server configuration or something missed?

I'm referring, for instance, to example

http://examples2.ext.net/#/GridPanel/Paging_and_Sorting/Local_Data_Paging/



protected void Store1_Submit(object sender, StoreSubmitDataEventArgs e)
{
XmlNode xml = e.Xml;

this.Response.Clear();

string strXml = xml.OuterXml;

this.Response.AddHeader("Content-Disposition", "attachment; filename=submittedData.xml");
this.Response.AddHeader("Content-Length", strXml.Length.ToString());
this.Response.ContentType = "application/xml";
this.Response.Write(strXml);

this.Response.End();
}



Thanks and bye