Search

TextBox with MultiLine TextMode adds additional linebreak to the output by ImarSpaanjaars

Closed
as Fixed Help for as Fixed

3
0
Sign in
to vote
Type: Bug
ID: 748052
Opened: 6/10/2012 8:15:56 AM
Access Restriction: Public
0
Workaround(s)
2
User(s) can reproduce this bug
When you have a TextBox control with its type set to MultiLine, .NET inserts an additional encoded line break to the output. IE 9 seems to ignore this linebreak, but other brwosers show it, causing incorrect behavior.

This happens when you assign text to the control, but also on the first load when no text is assigned, causing an extra linebreak to appear in the final HTML.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012 RC

Steps to reproduce

1. Create a new ASPX Web Form site
2. In Default.aspx add the following control:

<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"></asp:TextBox>

3. In Code Behind, assign some text in Page_Load:

protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Text = "Test";
}

4. View the page in the browser.

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

The control is converted into a textarea but has an encoded linebreak, like this:

<textarea name="TextBox1" rows="2" cols="20" id="TextBox1">&#13;&#10;Test</textarea>

Expected results

The control is converted into a textarea without the encoded linebreak, like this:

<textarea name="TextBox1" rows="2" cols="20" id="TextBox1">Test</textarea>
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 6/27/2012 at 5:39 AM
This issue has been fixed in VS 2012 RTM/.Net4.5 RTM.
Posted by Alvaro R. Dias on 6/23/2012 at 2:32 AM
This problem is happening for me in VS 2012 RC/.NET 4.5

Is there any update that I can apply to fix this?
Posted by Microsoft on 6/20/2012 at 4:30 PM
This issue has been fixed in the next release of VS2010/.Net 4.5.
Posted by Microsoft on 6/12/2012 at 2:20 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 6/10/2012 at 8:57 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.