Z
zacks
I am developing an app in VS2005 (actually in VB.NET but this
question, I believe, would apply to any .NET language) that is used to
design the contents of an XML file. One of potential items that would
be in this XML file is a String property that contains the code for a
VBScript. I have a separate form just for editing this script that
uses a single Textbox. This Textbox has the AcceptsReturn, AcceptsTab
and Multiline properties all set to True. I can create a new script
just fine and save it in the XML file. But if I re-load that XML file
for editing, and open the form with the contents of the script from
the XML file in it, all carraige returns are ignored. Oh, they are
definitely there, if you look at the XML file file with a hex editor,
there are definite <CR><LF> at the end of each of the scripts lines.
What is really strange is if I create a new script and re-edit it
before saving the XML and re-loading it, the carraige returns are
"displayed" in the Textbox as one would expect.
As I said, the XML file is fine. The problem come in when trying to
edit an existing script that has carraige returns in it.
question, I believe, would apply to any .NET language) that is used to
design the contents of an XML file. One of potential items that would
be in this XML file is a String property that contains the code for a
VBScript. I have a separate form just for editing this script that
uses a single Textbox. This Textbox has the AcceptsReturn, AcceptsTab
and Multiline properties all set to True. I can create a new script
just fine and save it in the XML file. But if I re-load that XML file
for editing, and open the form with the contents of the script from
the XML file in it, all carraige returns are ignored. Oh, they are
definitely there, if you look at the XML file file with a hex editor,
there are definite <CR><LF> at the end of each of the scripts lines.
What is really strange is if I create a new script and re-edit it
before saving the XML and re-loading it, the carraige returns are
"displayed" in the Textbox as one would expect.
As I said, the XML file is fine. The problem come in when trying to
edit an existing script that has carraige returns in it.