Adding a carriage return to text in a multiline textbox in design view.

  • Thread starter Thread starter Simon Middlemiss
  • Start date Start date
S

Simon Middlemiss

I have a multiline textbox which I would like populated in the following
manner.

"Line1
Line2
Line3
Line4"

etc. I know how to do it in code, but is there a way to do it in the design
view?

Cheers

Simon
 
Hi Simon,

I have done a lot of research regarding this issue but it seems to be an
issue by design. I cannot add a carriage return to the Text property in the
Properties Window of the TextBox. I will do more research to find a
specific answer.

On the other hand, would you please tell me why you need to do it in the
Design View? Since we can do it in the code, we can add the code to the
Page_Load event.

If I have misunderstood your concern, please feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
I have done a lot of research regarding this issue but it seems to be an
issue by design. I cannot add a carriage return to the Text property in the
Properties Window of the TextBox. I will do more research to find a
specific answer.

On the other hand, would you please tell me why you need to do it in the
Design View? Since we can do it in the code, we can add the code to the
Page_Load event.

If I have misunderstood your concern, please feel free to let me know.

Nope, you've banged the nail on the head, so to speak. There is no reason
other than to keep things a bit tidier, this text is never going to change
and is part of a pagelet that has no logic behind it, I didn't want to have
to add an handlers just to format some text!

Cheers

Simon
 
Hi Simon,

I totally understand the inconvenience to you.

I have done more research regarding this issue and found a workaround for
your reference. That is switching to the HTML Source view to do what you
want. Please refer to the following HTML code snippet.
...
<asp:TextBox id="TextBox1" style="Z-INDEX: 102; LEFT: 256px; POSITION:
absolute; TOP: 80px" runat="server"
Width="168px" Height="96px" TextMode="MultiLine" Rows="4" Columns="50">
Line1
Line2
Line3
Line4
</asp:TextBox></FONT></form>
...

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top