View Full Version : static xml file is binding but xlm from ashx is not

17 Jan 2010, 1:38 PM
Hello ,
I have just started using Extjs . Everything seemed fine until I used a ashx request for grid.
I can run the example from localhost below.

but when I change the line
url: 'http://localhost/js/examples/grid/sheldon.xml'
url: 'http://localhost/ashx/xml.ashx'
I get the response as xml but grid doesn't bind the xml data to grid. http://localhost/ashx/xml.ashx page gets the physical file sheldon.xml and writes the response.So I am sure that xml format is fine and data comes fine as response (also checked with firebug)

What am I missing ?

Thanks ...

18 Jan 2010, 8:21 AM
Coluld you please help me about this situation ?

18 Jan 2010, 11:03 AM
I can't see from your attached image - what is the Content-Type coming back from the server? It must be "text/xml" or "application/xml" for the XmlReader to handle it correctly.

18 Jan 2010, 11:38 AM
Thanks stdunbar,
It works fine now. I had forgotton to add the line to ashx file :D
context.Response.ContentType = "text/xml";