We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Loading diagram from web site files

Thread ID:





116268 May 6,2014 09:11 PM UTC May 7,2014 08:45 AM UTC ASP.NET MVC (Classic) 2
Tags: Diagram
Asked On May 6, 2014 09:11 PM UTC

For development purposes, I would like to store a diagram.xml file among my web site files, then load the diagram using DiagramBuilder.  I have successfully loaded a file from the local file system in the %Temp% location, but can't seem to get it to work for a file stored in the web site itself.  I have tried passing the following strings to the Load method, all of which result in an empty DiagramModel:




By the way, if I enter the fully qualified URL into a browser, I can see the XML stored in the file.

Is what I want to do possible?  If so, can anyone help me with getting the right syntax?  Thanks for your help.

Replied On May 6, 2014 10:17 PM UTC

I was able to answer this question myself.  Here's what I needed:

   HttpContextWrapper context = new HttpContextWrapper(System.Web.HttpContext.Current);

   var filePath = context.Server.MapPath("~/Content/diagram.xml");

    diagramView.Model.Load(filePath); // diagramView was previously assigned

Guess I should have looked a little more diligently before posting!

Shyam G [Syncfusion]
Replied On May 7, 2014 08:45 AM UTC

Hi Jeff,

Sorry for the delay in getting back to you,

We are glad that your issue got resolved.

Could you please let us know whether you are in need of any other assistance from us? Please get back to us if you need further assistance


Shyam G


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon