F
fd123456
The TextBoxes in ASP have a weird behaviour when it comes to handling
carriage returns. You can try this :
Create a Webform. On it, place a textbox, set it's TextMode property
to MultiLine.
Place a button. Double-click on the button and in it's event handler,
just type :
TextBox1.Text = TextBox1.Text ;
(if you're doing this in VB, just omit the ";").
Show that page in your favorite browser, or even inside the IDE. Type
two carriage returns (nothing fancy, plain old "Return" key), then any
text.
Now click on the button : the first CR disappears. Click again : the
next CR disappears. The rule is : if there is a CR at the top of the
text, it will be deleted.
Took me a while to figure, bacause at first I thought it was my
DataAdapter messing with the xml. I've searched the groups to no
avail. I'm doing this with VS 2003 and 2005 is not an option (yet).
Has anyone found a workaround to this? I'm stumped. Thanks in advance.
Michel
carriage returns. You can try this :
Create a Webform. On it, place a textbox, set it's TextMode property
to MultiLine.
Place a button. Double-click on the button and in it's event handler,
just type :
TextBox1.Text = TextBox1.Text ;
(if you're doing this in VB, just omit the ";").
Show that page in your favorite browser, or even inside the IDE. Type
two carriage returns (nothing fancy, plain old "Return" key), then any
text.
Now click on the button : the first CR disappears. Click again : the
next CR disappears. The rule is : if there is a CR at the top of the
text, it will be deleted.
Took me a while to figure, bacause at first I thought it was my
DataAdapter messing with the xml. I've searched the groups to no
avail. I'm doing this with VS 2003 and 2005 is not an option (yet).
Has anyone found a workaround to this? I'm stumped. Thanks in advance.
Michel