- May 27, 2002
- 12,653
- 205
- 106
Back story... at my work, we have several large XML configuration files which associate items along with costs, which can be used when building a CADD file to take estimate the quantity of material used within the drawing to give out an estimated cost of the entire build.
One of the things we have to do frequently is update the item costs in the XML file, because construction costs (stone, concrete, blacktop, fill, etc) fluctuate almost weekly.
So I had set out to make a document editor in C# Webforms which would be used to more quickly edit the needed values, without having to scroll thousands of lines in a text editor.
Currently, I have the following functionality.
Select and Load an XML text file document.
Read and parse the document.
For Each CostRatio element or UnitCost+Unit element pair, Dynamically
Create a Label with the Material Name and CodeDesignation,
Create an Editable TextBox for Cost Ratio or 2 Editable textboxes for UnitCost and Unit,
Create A Save Button for that row.
The user could then make a change to a the values and click the button in the row which would then update the XDocument,
And eventually Save the file back into the original XML document or a new copy.
So my problem is between page load and Data Change Save, since HTML is stateless, the XDocument object does not persist between events.
Now I know I can session the document and it could be editable for a short time up to timeout... but that seems like a terrible solution.
How do document editors such as google docs and microsoft word 365 online have doucment data that persists between postbacks without maintaining an active server side connection?
WebApp Document Editors seem to have a mythical state which isnt supposed to exist...
Is there a hidden client cache control I am missing?
The operations of Document Editors seem too slow for a database, and with so many simultaneous users and documents, that would seem an impossibility?
What am I missing.
One of the things we have to do frequently is update the item costs in the XML file, because construction costs (stone, concrete, blacktop, fill, etc) fluctuate almost weekly.
So I had set out to make a document editor in C# Webforms which would be used to more quickly edit the needed values, without having to scroll thousands of lines in a text editor.
Currently, I have the following functionality.
Select and Load an XML text file document.
Read and parse the document.
For Each CostRatio element or UnitCost+Unit element pair, Dynamically
Create a Label with the Material Name and CodeDesignation,
Create an Editable TextBox for Cost Ratio or 2 Editable textboxes for UnitCost and Unit,
Create A Save Button for that row.
The user could then make a change to a the values and click the button in the row which would then update the XDocument,
And eventually Save the file back into the original XML document or a new copy.
So my problem is between page load and Data Change Save, since HTML is stateless, the XDocument object does not persist between events.
Now I know I can session the document and it could be editable for a short time up to timeout... but that seems like a terrible solution.
How do document editors such as google docs and microsoft word 365 online have doucment data that persists between postbacks without maintaining an active server side connection?
WebApp Document Editors seem to have a mythical state which isnt supposed to exist...
Is there a hidden client cache control I am missing?
The operations of Document Editors seem too slow for a database, and with so many simultaneous users and documents, that would seem an impossibility?
What am I missing.