Click here to Skip to main content
13,005,644 members (65,519 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am developing c# web application .net frame work 4.5.

I used a database for storing feedback from users. for displaying comments i used all of these (datalist, list view, gridview,formview, detail view) but problem is that when the comment is a long string, whole string is printed in single line, which realy destroyes beauty of a page.

Name: aaa
Email: @yahoo
Feedback: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
DateAdded: 10/3/2012 12:00:00 AM

this whole line is printed in single line.
i want if there is a long string, suppose more than 100 charecters. i want to display 100 char in one line and rest of string in next line.

is there any possibilty with either of control, specially i am interested in list view.
is there any possibilty with list view to print a long string in more than one line????
another question is that is there any posibilty with list view to delete any comment?????

Posted 3-Oct-12 9:47am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Look at my article: Word wrap without cutting words[^]
Or any others found by searching on "word wrap"
Matt T Heffron 4-Oct-12 13:38pm
The most obvious way is to format the string before putting it into the control.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170627.1 | Last Updated 3 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100