Hello,
If I set the text of a RadTextBox to something like the following:
I believe there should be three empty lines and then on the fourth, "Some text". This is how the standard asp.net textbox works when in multiline mode.
If I modify the text to:
"a\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text"
Then both textboxes behave the same.
The problem I have is that after a postback, if I intended there to be three empty lines before the text, only two are displayed on the page. Thus, only two are returned in the Viewstate. Upon a second postback, only one line exists in the Viewstate and so forth until non-space characters are all that is left at the beginning.
I have mocked up a simple page showing this issue. After each click of the 'Postback' button another line is removed. The Asp.Net textbox works just fine. Is there a simple way to fix this?
Thank you in advance!
Chris
If I set the text of a RadTextBox to something like the following:
"\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text"
I believe there should be three empty lines and then on the fourth, "Some text". This is how the standard asp.net textbox works when in multiline mode.
If I modify the text to:
"a\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text"
Then both textboxes behave the same.
The problem I have is that after a postback, if I intended there to be three empty lines before the text, only two are displayed on the page. Thus, only two are returned in the Viewstate. Upon a second postback, only one line exists in the Viewstate and so forth until non-space characters are all that is left at the beginning.
I have mocked up a simple page showing this issue. After each click of the 'Postback' button another line is removed. The Asp.Net textbox works just fine. Is there a simple way to fix this?
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadTextBox
ID
=
"txtMessage"
runat
=
"server"
TextMode
=
"MultiLine"
Rows
=
"10"
Columns
=
"200"
/>
<
asp:TextBox
ID
=
"txtASPMessage"
runat
=
"server"
TextMode
=
"MultiLine"
Rows
=
"10"
Columns
=
"200"
></
asp:TextBox
>
<
br
/>
<
asp:Button
ID
=
"btnPost"
runat
=
"server"
onclick
=
"btnPost_Click"
Text
=
"PostBack"
/>
</
div
>
</
form
>
</
body
>
protected void Page_Init(object sender, EventArgs e)
{
txtMessage.Text = "\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text";
txtASPMessage.Text = "\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text";
}
protected void btnPost_Click(object sender, EventArgs e)
{
}
Thank you in advance!
Chris