I am storing data from a MultiLine
TextBox into my database but when i am trying to display that data into a DataList, it displays it as a single line.
e.g. when I enter text like this the
TextBox
No Teachers.
" Teachers
3 Teachers
Five Teachers.
The end result at the time of dispaly is:
No Teachers. " Teachers 3 Teachers Five Teachers.
I have looked into my database and in there it has stored the data with two square things after the end of each line as entered at the time sending to database.
I am just wondering is there any way i can get around with this problem
And another thing I want to do is to allow users to type in some basic HTML tags like <b>, <u> and <li> etc.
Or better still, provide some basic Rich Text Editor for user input.
I am kind of new to ASP.NET, so please if you could give me detailed instructions that would be more helpful.
immy
Member
2 Points
20 Posts
Handling Multiline Texttbox data for displaying
Apr 09, 2007 04:24 AM|LINK
Hi,
I am storing data from a MultiLine TextBox into my database but when i am trying to display that data into a DataList, it displays it as a single line.
e.g. when I enter text like this the TextBox
No Teachers.
" Teachers
3 Teachers
Five Teachers.
The end result at the time of dispaly is:
No Teachers. " Teachers 3 Teachers Five Teachers.
I have looked into my database and in there it has stored the data with two square things after the end of each line as entered at the time sending to database.
I am just wondering is there any way i can get around with this problem
And another thing I want to do is to allow users to type in some basic HTML tags like <b>, <u> and <li> etc.
Or better still, provide some basic Rich Text Editor for user input.
I am kind of new to ASP.NET, so please if you could give me detailed instructions that would be more helpful.
TextBox multiline textbox displaying multiline textbox
pkellner
All-Star
24042 Points
3625 Posts
ASPInsiders
Moderator
MVP
Re: Handling Multiline Texttbox data for displaying
Apr 09, 2007 04:31 AM|LINK
I wrote a post that might help you with how to let people enter HTML with brackets and stuff.
http://dotnetslackers.com/articles/aspnet/Encode_and_Display_HTML_Securely_in_ASP_NET_2_0.aspx
HTH's.
http://peterkellner.net
Microsoft MVP • ASPInsider
mokeefe
Star
10850 Points
2098 Posts
Re: Handling Multiline Texttbox data for displaying
Apr 09, 2007 04:40 AM|LINK
This might be of some additonal info - http://forums.asp.net/thread/1591134.aspx
And this is free - > http://freetextbox.com/
Martin.
For the benefit of all users please mark any post answers as appropriate.