A really simple problem, that well, i had faced sometime back in Classic ASP days,...
Simply, i have a Textarea, and when i hit enter twice , to create a new paragraph, and save the data. when displayed in asp.net, the line break or paragraph is not shown and the paragraph space is gone.
Back in classic asp, we were replacing vbcrlf with <br>, seems in .NET its the same if your language is VB, but i have move on to C# and in C# its actually really simple.
Comment = Comment.Replace("\r\n", "<br />");

Simply, i have a Textarea, and when i hit enter twice , to create a new paragraph, and save the data. when displayed in asp.net, the line break or paragraph is not shown and the paragraph space is gone.
Back in classic asp, we were replacing vbcrlf with <br>, seems in .NET its the same if your language is VB, but i have move on to C# and in C# its actually really simple.
Comment = Comment.Replace("\r\n", "<br />");
No comments:
Post a Comment