I've spent the better half of the past 4 work days trying to find a solution to this issue, but as a newbie coder, I'm yet to find a solution.
Basically I'm interning in this company, and they tasked me with translating a .NET app (C#) from doing its reading and writing of a webpage from a .dll to a .xml. The page is still opened from the dll, yet all the settings-saving will be done on the .xml, located at ./config.xml. I got it to write the file from the C# end, but when it comes to in-browser, client-side saving, I'm getting some issues. The page looks like this
In the previously mentioned DLL, that is hosted using IIS, I can both use C# to program server-side stuff and html through the use of a C# variable from a proprietary method that is used to render the webpage.
Every checkbox and dropdown (and its content) is dynamically given an HTML ID taking into consideration the divider it lies in and the number of the item, for example "general1", "misc3". To do that, I used XElement to create the base XML, which is read using C# and plugged into the html, and several javascript scripts to read what checkboxes are checked and what values the dropdowns own.
I'm having issues with the saving part, as this is a webpage meant to be opened on a mobile phone and needs to save the xml file onto the server. I've coded it so that, at the end of the page, there's a debug section so I can see the variables and their values, and update the webpage according to the item's contents (basically a way for me to study how getelementbyid and innerhtml work in JS). I then process the webpage data, and print out to a
what the .xml file would look like, as I stored it on a javascript variable. My major issue is finding out how to save that javascript variable into a file. I've read around that I could use php and VB, but I have no clue 1- how to code those and 2- if I can even implement that in this scenario. I've also looked around some javascript ways of doing this, but it often involves the user specifying where to save it LOCALLY, instead of somewhere hardcoded on the server. Any help will be incredibly thanked, as I managed to even baffle my higher-ups, so no one here found a solution yetTL;DR: Got a client-side variable in javascript from an aspx, need to save it locally through javascript to a hardcoded location, maybe using php if you can get me to wrap my head around how it even works