We help IT Professionals succeed at work.

gridview omitting <BR> in databound field

lyntron4545 asked
Medium Priority
Last Modified: 2008-01-09
After doing a conversion from asp 1.0 to 2.0 I'm also upgrading all of my datagrids to gridviews.  What I'm doing is using a mysql query to bind it to a databound field in a gridview.  The datagrids were able to handle the <BR> and add the appropriate line break, however the gridview is actually adding <BR> to the text.  I've tried adding controlchars.NewLine within my concat function of mysql but that didn't work.  I also tried doing a .replace("<BR>", "****"), the '*' is for testing, during RowDataBound and PreRender but to no avail.

Any Ideas??????
Watch Question


I solved my own question.

The solution was to convert the databound column to a template field.

Can I have my points back please?
Top Expert 2006

Hi lyntron4545,

Please, when you get a chance, close this question.  

To do so, post a zero-point question in http://www.experts-exchange.com/Community_Support/

Subject: Moderator Please PAQ
Body: Please PAQ this question, I answered it myself

Thank you!

-- Jason
Closed, 500 points refunded.
Site Admin

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.