Hello everybody,
When I am trying to set the text of a Multiline RadTextBox from CodeBehind, Internet Explorer (tested with 9 & 11) does not render new lines.
The text is coming from our database and lines are separated by "\r\n" - which should work in a textarea according to various other pages. Firefox and Chrome display it perfectly fine, while IE doesn't work (see attachments).
The text coming from the database is:
"06.02.2014 10:57, LeonardTest: defg\r\n06.02.2014 10:57, LeonardTest: hijk\r\n06.02.2014 10:57, LeonardTest: abcd\r\n"
I also tried replacing "\r\n" by " " (html new line) as well as <br />, but neither of them work.
Does anyone know a solution for this problem? It would be greatly appreciated!
Thanks
Leonard
When I am trying to set the text of a Multiline RadTextBox from CodeBehind, Internet Explorer (tested with 9 & 11) does not render new lines.
The text is coming from our database and lines are separated by "\r\n" - which should work in a textarea according to various other pages. Firefox and Chrome display it perfectly fine, while IE doesn't work (see attachments).
The text coming from the database is:
"06.02.2014 10:57, LeonardTest: defg\r\n06.02.2014 10:57, LeonardTest: hijk\r\n06.02.2014 10:57, LeonardTest: abcd\r\n"
I also tried replacing "\r\n" by " " (html new line) as well as <br />, but neither of them work.
Does anyone know a solution for this problem? It would be greatly appreciated!
Thanks
Leonard
5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 06 Feb 2014, 10:33 AM
Hi Leonard,
Unfortunately I couldn't replicate the issue at my end. Please have a look into the sample code snippet which works fine at my end.
ASPX:
C#:
Let me know if you have any concern.
Thanks,
Shinu.
Unfortunately I couldn't replicate the issue at my end. Please have a look into the sample code snippet which works fine at my end.
ASPX:
<
telerik:RadTextBox
TextMode
=
"MultiLine"
ID
=
"RadTextBox1"
runat
=
"server"
>
</
telerik:RadTextBox
>
C#:
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadTextBox1.Text=
"Hello\r\nHai"
;
}
Let me know if you have any concern.
Thanks,
Shinu.
0
Leonard
Top achievements
Rank 1
answered on 06 Feb 2014, 10:51 AM
Hi Shinu,
thanks for your quick reply!
However, when I replaced the text coming from the database with your snippet, it still doesn't work in IE, while FF displays it correctly - again.
I am using the newest telerik and .Net versions. Here is the code of my textbox - is it possible that the resource file causes this issue? The text is only set in code behind, though.
thanks for your quick reply!
However, when I replaced the text coming from the database with your snippet, it still doesn't work in IE, while FF displays it correctly - again.
I am using the newest telerik and .Net versions. Here is the code of my textbox - is it possible that the resource file causes this issue? The text is only set in code behind, though.
<
telerik:RadTextBox
ID
=
"txtHeaderRemarks"
runat
=
"server"
TextMode
=
"MultiLine"
Label
=
"Remarks"
LabelWidth
=
"90px"
Width
=
"886px"
Height
=
"60px"
meta:resourcekey
=
"txtHeaderRemarksResource1"
>
</
telerik:RadTextBox
>
0
Accepted
Shinu
Top achievements
Rank 2
answered on 07 Feb 2014, 03:44 AM
Hi Leonard,
I am not able to replicate the issue at my end, given code is working fine for me. One suggestion is that you can use Environment.NewLine which inserts a new line in a string. Please try the following C# code snippet which works fine at my end.
C#:
Thanks,
Shinu.
I am not able to replicate the issue at my end, given code is working fine for me. One suggestion is that you can use Environment.NewLine which inserts a new line in a string. Please try the following C# code snippet which works fine at my end.
C#:
txtHeaderRemarks.Text =
"This is an example"
+Environment.NewLine+
"New line"
;
Thanks,
Shinu.
0
Leonard
Top achievements
Rank 1
answered on 19 Feb 2014, 03:22 PM
Hi,
unfortunately, your last idea did not work either and we could not find any solution until we upgraded to the Q3 2013 SP2 version - now the bug has been gone. So it seems like it was a telerik issue, with the newest version everything's fine.
Thanks a lot,
Leonard
unfortunately, your last idea did not work either and we could not find any solution until we upgraded to the Q3 2013 SP2 version - now the bug has been gone. So it seems like it was a telerik issue, with the newest version everything's fine.
Thanks a lot,
Leonard
0
Hi Leonard,
You are correct, this was an issue with IE11 that was reported by a client and fixed.
Regards,
Venelin
Telerik
You are correct, this was an issue with IE11 that was reported by a client and fixed.
Regards,
Venelin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.