Monday, March 26, 2012

Probably, I found a bug [NewLine in MultiLine TextBox]

Try to run this sample (enter to textbox some lines of text, and then click "Post"):

<%@dotnet.itags.org. Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits=".WebForm1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:UpdatePanel ID="updPanel" ChildrenAsTriggers="true" runat="server"><ContentTemplate><asp:TextBox ID="txtTest" runat="server" TextMode="MultiLine" /><asp:Button ID="butTest" runat="server" Text="Post" /><br /><div style="border:solid 1px red; padding:20px;"><%=txtTest.Text.Replace(Environment.NewLine, "<br/>")%></div></ContentTemplate></asp:UpdatePanel> </div> </form></body></html>

I am using a release version of AST.NET AJAX.

What's the bug?

If you enter some lines of text in Firefox into textbox, and then post it to the server via AJAX, newline symbols will be damaged.

In Opera and IE all works fine.


"Firefox" would be the reason I didn't see the error initially. That is a pretty annoying bug.

I'm experiencing this exact same issue ... did you get it resolved?

Cheers!

No comments:

Post a Comment