473,721 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remove line from multiline textbox

How can i remove specific line from the multiline textbox?

Apr 19 '06 #1
3 13774
I don't think you can do this - the value of a text box (multiline or
not) is one long string. I'd be tempted to use a ListBox, which allows
for manipulation of individual items.

I suppose you could split the string in the text box using the \r\n
characters for a carriage return\newline, and delete the correct part -
but a ListBox would be a much more efficient solution.

Apr 19 '06 #2
Thank you for the sugestion i will test it

Apr 19 '06 #3
Hi,

"Sale" <al************ ****@gmail.com> wrote in message
news:11******** **************@ v46g2000cwv.goo glegroups.com.. .
How can i remove specific line from the multiline textbox?


textbox1.Text = textbox1.Text.R emove( startIndex, length );

All you have to do is know where the line start and how big it's
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Apr 19 '06 #4

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

Similar topics

6
16247
by: Nurchi BECHED | last post by:
Hello, All! I have created an application with a multiline textbox on the form. When I press a button, it has to show something and then break the line and show something else. I tried "\n", ((char)13) and ((char)10) - they don't work. When I enter a break by hand (just press enter) and run through each character in that string, the line break character has code 13 10 (yes, 2 numbers for some reason) The possible reason is that 'Enter'...
7
4047
by: Joel Finkel | last post by:
Folks, I have a form that has several TextBoxes, some of which have the TextMode set to MultiLine. Each is pre-loaded with data from a database. The user is allowed to modify each entry. The problem is that only the modified data from the SingleLine TextBoxes are returned. The original data are returned for the MultiLine TextBoxes. Also, if the page is sent to the server (for validation, for instance), only the modified data for the...
1
15703
by: Olav Tollefsen | last post by:
I have added a MultiLine TextBox to my aspx page: <asp:TextBox ID="TextBox1" runat="server" BorderStyle="None" ReadOnly="True" TextMode="MultiLine"></asp:TextBox> Then I add two lines of text to it: TextBox1.Text = "Line 1\r\nLine 2"; The problem is that a vertical scrollbar is displayed
9
20173
by: Charles Law | last post by:
I have a form on which user controls are placed at runtime. When a control is added to the form a handler is added for an event that a high-level object raises, which must be handled by the new control. When I close the form I am expecting that the control ceases to be. However, if my object raises the event after the form has been closed, I find that there is still a user control object that handles it. Clearly the user control has not...
1
2573
by: mosscliffe | last post by:
I have a Gridview created by dragging a table onto a web form page and I have enabled the edit key. One of my field is a multi-line 'text' field. How do I change the standard textbox created into a multiline one. Any help, pointers or examples greatly appreciated, as I have to get this working very quickly
1
1903
by: Jeff | last post by:
hey asp.net 2.0 In my website I've got a textbox with TextMode=MultiLine. The user can enter text that contain "new line"... But to displays this I'm also using a textbox with TextMode=MultiLine and ReadOnly=True. The textbox displays a ugly border arround the textbox, including scrollbars
2
3668
by: BillE | last post by:
I need to create a multi-line label dynamically. Since labels aren't multi-line, I'm creating a textbox and making it look like a label with the multiline property set to true. I want to increase the height of the textbox only if there are multiple lines, and leave it at the default height if the text does not wrap after setting the Text property. I thought I could use the Lines property after setting the Text property,
2
7316
by: sherifffruitfly | last post by:
Hi all, I'm using a multiline+scrollbar textbox to log output as my program runs. Basically, I pass a reference to the class instance that's currently doing stuff, and the instance can tack on whatever it needs to the text property. Initially I had trouble with getting the textbox to refresh as-the-program ran, but the TextBox.Refresh() method took care of that for me.
6
2999
by: Steve | last post by:
I'm getting a string such as name1\r\nname2 how can I remove the \r\n and just have the string as name1 name2?
0
8840
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
8730
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9064
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
8007
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...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3189
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
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2130
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.