1

I have xml file with .xls style. How Can I display it on my mvc view (razor)?

Localization file: @"D:\Result22.xml"

1 Answer 1

3

You can use this

XmlDocument doc = new XmlDocument();
doc.LoadXml(input);

If you prefer you can instead make the content type change from your view action, like so

public ActionResult MyAction() {
          Response.ContentType = "text/xml";
          return View();
 }

OR

You can use an XSLT to convert your XML into XHTML and then display that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.