Hi Vmax,
- The save and load in diagram are performed using diagram API’s diagram.save() and diagram.load().
- The Save method returns serialized json object of diagram.
- This json object can further be converted to string in the client side and send it to the server side using AJAX.
- In the server side, you can save the JSON string into the text file or database.
- Later the same string can be retrieved from the stored location and converted back to json object and loaded using Load method.
- if you need to save and load the diagram in the database, please refer to the kb link. Please refer to the code example in which we have saved the JSON string in the text file and retrieved from that file and loaded the diagram.
Code example:[WebMethod]public static void save(string JSONstring){//get the locationvar path = Path.Combine(HttpContext.Current.Server.MapPath("~/Images"), "JSON.txt");//write the jsonstring to text fileFile.WriteAllText(path, JSONstring);}[WebMethod]public static string load(){var path = Path.Combine(HttpContext.Current.Server.MapPath("~/Images"), "JSON.txt");//read the json string from text filestring JSONdata = File.ReadAllText(path);return JSONdata;}Regards,Shyam G
Hello Shyam,
Firstly I want to thank you for you response, your supportive code is very effective, in the other side there was a repeating during drawing the diagram. attached video and code files.
Regards.
Hi Shyam G,
There is now changing after eliminate white-spaces, If ScriptManger is not exist item not duplicate, but save/load functions exactly not working. so how can implement a diagram builder like http://asp.syncfusion.com/demos/web/Dashboard/DiagramBuilder.aspx
Regards.
Hi Shyam,
Thank for you assistance. well done.
Regards.