473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

textbox to label issues

i have a freetype text box which contains text like (not exactly like
this!!) :-
{
textext eteasdadadasdasddddddddddddddaasdasd

wqeqeqweqweqwe

qweqeqeqeqwewqerqerqwerqwerqwerqwerqwerqw
qwrqwerqwer

wqeqwer
}

which is created with code like this :-

{
TextBox12.Text = TextBox12.Text + "textext
eteasdadadasdasddddddddddddddaasdasd" & vbCrLf
TextBox12.Text = TextBox12.Text + "" & vbCrLf
TextBox12.Text = TextBox12.Text + "wqeqeqweqweqwe" & vbCrLf
}
i have a button on the form that converts all textboxes to labels, but the
carraige returns dont get translated you end up with :-
{
textext eteasdadadasdasddddddddddddddaasdasd wqeqeqweqweqwe
qweqeqeqeqwewqerqerq
werqwerqwerqwerqwerqw qwrqwerqwer wqeqwer
}
in the label,

question is how can i preseve the carraige returns in the label - ? - theres
nothing in the html source that would allow me to do a replace()
on the text box contents (i'd normally replace the vbCrLf with a <br> )

cheers

mark

Nov 19 '05 #1
2 1138
Hi Mark

Place all text of text box in between <pre>textboxtext</pre>.

for example:

label.Text = "<pre>" & textbox.Text & "</pre>"

try this and let us know. I hope this will work.

Regards
Fiaz Ali Saleemi
Nov 19 '05 #2

"Fiaz Ali Saleemi" <fs******@abacusoft.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Hi Mark

Place all text of text box in between <pre>textboxtext</pre>.

for example:

label.Text = "<pre>" & textbox.Text & "</pre>"

try this and let us know. I hope this will work.

Regards
Fiaz Ali Saleemi

that works great - to a point - it removes all formatting - it reverts back
to default font etc. anyway of getting round that ?

cheers

mark

Nov 19 '05 #3

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

Similar topics

4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
1
by: Shilpi Chaudhry | last post by:
I have a forloop which I use to create textboxes - but unfortunately all of them have the same ids - I need to assign different ids to these textboxes creeated in the loop so that I can retrieve...
0
by: CharlesA | last post by:
Hi folks, I'm using ASP.net 1.1 with C# I've got this kind of thing going <div class="row"> <label class="col1">Rm Name</label> <asp:textbox id="txtRM" runat="server" cssclass="col2"...
0
by: Zark3 | last post by:
Hi all, In a web form I use a for loop to dynamically add TextBox'es to a page (one for each item in an input file). I can get the input values and I can display them in Label's and TextBox'es....
0
by: Mark | last post by:
I want to create a user control inherited from a TextBox with an associated label (let's call it a LabelTextBox). The trick is that I want the control to inherit from TextBox and have all of its...
6
by: rn5a | last post by:
When the EditCommandColumn in a DataGrid is clicked, all the BoundColumns get replaced by TextBoxes so that users can alter the data. By default, the Text in the TextBoxes are left-aligned. Is...
10
by: moondaddy | last post by:
I have a textbox on a webform and based on certain conditions I wanted to prevent a user from editing its text. I dont like the look of the texbox when its disabled and was wondering if there is a...
2
by: mylog | last post by:
Hi all, I am having a small problem on getting the values of the dynamically generated textboxes in C# windows application. I have successfully read an xml file and put its key and value fields as...
0
KalariaNitya
by: KalariaNitya | last post by:
Hello, could anybody help me? i have gridview, inside gridview i have one Update button & textbox update button update the quantity entered in textbox. i want to update the quantity on textbox on...
1
by: Jim in Arizona | last post by:
On one page I have a datalist where a message is bound to a label. On another page I have the datalist which allows for the insert of new message as well as being able to edit those messages. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...

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.