Problem:
The common reason for XML Parsing Error: no element found is missing closing tag for one or two html element, so I checked whole xml docs several times to make sure not miss any start and closing( or ) tags.
Solution:
After searching for while I found that somehow ASP.NET treat the response of page as XML document and that’s why we receive XML Parsing Error: no element found error.
To solve this error I added a line
Response.ContentType = "text/HTML"to .cs page. This line tells ASP.NET runtime that response is HTML text and not XML.
No comments:
Post a Comment