View Full Version : Open filestream in .NET Server
hvan1
November 23, 2007, 11:26:40
Hi,
Is there any possibility to load a filestream in Browsertextcontrol (.NET Server)? The load method only seems to accept a serverpath...
Thanks in advance,
Harold
Björn Meyer
November 23, 2007, 17:31:48
Harold
Currently, it is only possible to load a document from a physical file. The next version of TX Text Control .NET Server will support other possibilities. In this case, it will be possible to load a document from a variable. A FileStream won't make sense as BrowserTextControl runs on client-side.
hvan1
November 24, 2007, 12:11:28
Hi Björn,
I'm using browsertextcontrol to create a web based texteditor. Now I happen to have an old client server application running that used the offset parameter to load/save files. To load these files in .Net version, you wrote the solution in your blog (filestream). Only thing is that this solution is exclusively usable for the servertextcontrol. Got any other ideas?
Thx,
Harold
Björn Meyer
November 25, 2007, 10:48:13
You could use the same approach to extract the content from file using ServerTextControl. This stream must be saved temporary on the server to be loaded by the BrowserTextControl.
hvan1
November 26, 2007, 11:17:28
Hi Björn,
Thanks,
We shared the same thoughts. Only thing is... I really wouldn't know how to save that part (offset 30) of the stream in a file? I surfed the whole wide web, but didn't find a solution. The problem is to edit an open file stream and then save it to the same filename.