Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Carriage Return/Line Feed Puzzle
Message
From
17/12/2005 10:37:43
 
 
To
17/12/2005 09:59:11
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01078811
Message ID:
01078943
Views:
37
Stephen,

I was about to post a code snippet for TextBox EventHandlers, until I realized that this was a WebForm TextBox you were talking about, not WinForm. In a WinForm TextBox, there are Parse and Format events, and you can put code in the events to replace the CR/LF with the appropriate character string, both before it gets displayed and after the user types into the textbox and it gets placed in the data. However, I don't use ASP much, so I'm not sure where to put this code in an WebForm TextBox. Maybe you simply replace before you put it in the TextBox, and after you get it back from the TextBox on the PostBack. Simply use a string's Replace method.

~~Bonnie



>Thank you for the detailed example, but I am afraid you have lost me. (I've only been working with aps.net and vb.net for a couple of months.) Is the trick here to use a streamreader to insert the memo fields? In my web page I am building up the "Update" command one text box at a time. I then pass the command off to a business object that uses the execute nonquery method to apply it to my foxpro database. I am currently pursuing a way to use string replacement to substitute any found "vbcrlf" strings with the "chr(13)+chr(10)" string as I build up the Update command. I haven't fully tested it yet though.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform