Advertisement

06.06.2007 at 10:52PM PDT, ID: 22618271
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

VS Studio 2005 handling of Carriage Returns and Line Feeds

Asked by kmoloney in .NET, Visual Basic Programming, VB Database Programming

Tags: , , ,

This is primarily concerned with visual basic, althought it might have applications in other languages.

Visual Studio supplies a formview control for web-based applications that can be bound to a SQL Server database.  In edit mode, a control can be made to be multiline, and thus accept carriage returns and line feeds.  When the item is saved, the carriage return/line feed is converted to a Microsoft.VisualBasic.vbCrLf character.  This charcter is not displayed when viewing the record in view-only mode, so if I enter:
------------
Jack Be Nimble
Jack Be Quick
Jack Jumped because he was a goon

Thank you.
--------------

Is displayed as:

Jack Be NimbleJack Be QuickJack Jumped because he was a goon

--------------

I have found that the vbcrlf is stored in the SQL database (some have suggested it is not), but to convert it to a display-only, I need to do a replace function, replacing the vbcrlf with a <BR /> to make it "web compatible".  But then, if I need to edit that same record, I need to remove the "<BR />'s and replace them back with vbcrlf's.

It's important that the CRLF's remain consistent between the database, the editing / entering display, and the read only display in, for example, the formview control (I'm sure other web-based controls have the same issue).  Is there any other solution than doing this "replace" function every time the user changes views?  I'm hoping there's a simple property there that I haven't yet discovered.

CRLF's should be carried from database to webview without need of coding, or with a minor property change.  Any help.
Start Free Trial
[+][-]06.06.2007 at 11:15PM PDT, ID: 19231157

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Visual Basic Programming, VB Database Programming
Tags: carriage, database, returns, vs
Sign Up Now!
Solution Provided By: Dhaest
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.01.2007 at 08:21AM PDT, ID: 19399259

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.05.2007 at 05:46PM PDT, ID: 19428688

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32