Line Break Issue

  • Thread starter Thread starter Simon Gare
  • Start date Start date
S

Simon Gare

Hi all,

have a line of code in a ViewLocation.aspx.cs file below

StringBuilder sb = new StringBuilder();
sb.Append("Driver No:
").Append(driver.DriverNo.ToString()).Append("<br>");
sb.Append("Name: ").Append(driver.FirstName).Append("
").Append(driver.LastName).Append("<br>");
sb.Append("Phone: ").Append(driver.PDAPhoneNumber);

Problem is when it is displayed on the page it shows like this

Driver No: 1<br>Name: Donald Stewart<br>Phone etc etc

Should be

Driver No: 1
Name: Donald Stewart
Phone: 07912 000000 etc etc

Anyone help?

Regards
Simon

--
Simon Gare
The Gare Group Limited

website: www.thegaregroup.co.uk
website: www.privatehiresolutions.co.uk
 
Hello Simon,

Well, you don't mention what you do with the string once you have finished
concatenating it. Obviously you are doing something with it where clear
text is expected and the HTML tags you include in the string are not
recognized.


Oliver Sturm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top