473,624 Members | 2,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
Nov 17 '05 #1
3 2265
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.

Nov 17 '05 #2
> 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
Nov 17 '05 #3
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="Multi Line" 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.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
16406
by: Rob Lemieux | last post by:
Using Visual Basic 6.0 I want the program to be able to print the carriage return. txtDisplay.Text = "Welcome to" + Chr(13) + "my demo." All I get is Welcome to|my demo.
0
1779
by: raj | last post by:
I have multiline-text box in my C# application. User enter text into the multiline-text box, and without completing the whole line, user press Enter Key and go to the next line, by leaving the '\n'(new line character) in the string. I use this text to write to a database field and then write that field to an excel file. The string is not writing to a single line as it has the carriage return ('\n), wraps the text into the next line in...
1
2186
by: VMI | last post by:
If I want to separate a string in a web textbox so that it takes several lines, how can do it? In a Windows textbox, I only needed to add the "\r\n" to the string for the carriage return. Apparently it's not the same with the web textbox. Thanks.
5
12371
by: Tim | last post by:
Hi Guys, I want to write a string to a multiline textbox. Below is the code. Works great except the carriage returns are displayed as squares. What do I need to do to have the text displayed properly with returns. Tim PrintDocument pDoc = new PrintDocument();
3
4868
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
7
3731
by: Nathan | last post by:
How do you code a carriage return in a textbox? For example, Txtbox1.Text = "My address:" & ?CarriageReturn? & "555 Maple" & ?CarriageReturn? & "Somewhere, USA" so that the textbox shows the following: My address: 555 Maple Somewhere, USA
5
1528
by: Neo Geshel | last post by:
Greetings. I am in a very big pickle. I am trying to add page content - as well as a submit button - programatically to a web form that is supposed to submit to DB and then refresh. That is, a user goes to the web page, which draws the current content out of the db and inserts into a "preview" area as well as the form itself. User makes changes, hits submit button. The page *should* refresh, with the changes saved to the db, and...
2
17015
by: dancer | last post by:
Using ASP.Net and VB.net I have textboxes (<asp:textbox id......>) in which the user will be entering paragraphs. They are multiline (several rows and several columns). The carriage returns that the user puts in (return/enter key) do not show up when the data is retrieved. It is one long line. Is there any way to make the user's paragraph divisions show up in the report?
2
4108
by: Steve | last post by:
Hello, I'm new to the asp.net programming world and one of my first projects is to create an entry form for managers to enter in some information about their employees. My form has a multiline text box so the manager can add 1 or more employeess. They have to enter in the information as domain\username. My question is, how can I strip the domain name from the begining of the username? It has to be stored in a seperate column in the...
0
8238
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8624
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7164
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1485
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.