Omair Aslam
Omair Aslam

Reputation: 79

\n line break in asp.net core mvc not working for last string word

`var description="some text"+"\n some text 2" +"\n some text 3";

Out put:
some text
some text 2 some text 3.

why some text 3 is also showing with some text 2 instead of breaking line.`

Upvotes: 1

Views: 935

Answers (1)

Omair Aslam
Omair Aslam

Reputation: 79

I find solution,to show string data of asp.net mvc with break line,use style attribute "white-space: pre-wrap" on Html element.

Upvotes: 3

Related Questions