473,387 Members | 1,502 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,387 software developers and data experts.

Text in a textbox

On my webform I have a textbox. When the page loads I put some text in the textbox. The text is 2 sentences and all I want to do is to put the sentences on different lines.

It use to be so simple:

textbox1.text = "Sentence1." & vbCrLf & "Sentence2."

The above doesn't seem to work the sentences are on the same line.

Please help with this simple thing.....

Thanks

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 18 '05 #1
5 1531
is the textbox.textmode set to "MultiLine" ?

"Paul P" <pp*******@rattanconsulting.com> wrote in message
news:OF**************@TK2MSFTNGP12.phx.gbl...
On my webform I have a textbox. When the page loads I put some text in the textbox. The text is 2 sentences and all I want to do is to put the
sentences on different lines.
It use to be so simple:

textbox1.text = "Sentence1." & vbCrLf & "Sentence2."

The above doesn't seem to work the sentences are on the same line.

Please help with this simple thing.....

Thanks

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &

ASP.NET resources...
Nov 18 '05 #2
I tried the multiline option but it has the scroll bar on it and I don't want to see the scroll bars. If you know of a way to get rid of the scroll bars, please let me know.

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 18 '05 #3
> I tried the multiline option but it has the scroll bar on it and I don't
want to see the scroll bars. If you know of a way to get rid

Sure. Use an editable Div instead. You can make it look any way you want it
to. If you need server-side functionality, use the Panel Control, which
renders a Div.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Paul P" <pp*******@rattanconsulting.com> wrote in message
news:eS**************@TK2MSFTNGP12.phx.gbl...
I tried the multiline option but it has the scroll bar on it and I don't want to see the scroll bars. If you know of a way to get rid of the scroll
bars, please let me know.
************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &

ASP.NET resources...
Nov 18 '05 #4
Paul,

You'll have to set the text box to multi-line to get your two lines of text.

One way to get rid of the scroll bar would be to use cascading style sheets:

..TextBox {
overflow: hidden
}

You could add this to your page's style sheet and then assign ".TextBox" to
the CssStyle of the text box.

The choices you may assign to overflow are:

auto - If the content is clipped, the browser should display a scroll-bar to
see the rest of the content

hidden - The content is clipped, but the browser does not display a
scroll-bar to see the rest of the content

scroll - The content is clipped, but the browser displays a scroll-bar to
see the rest of the content

visible - The content is not clipped. It renders outside the element.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Paul P" <pp*******@rattanconsulting.com> wrote in message
news:eS**************@TK2MSFTNGP12.phx.gbl...
I tried the multiline option but it has the scroll bar on it and I don't want to see the scroll bars. If you know of a way to get rid of the scroll
bars, please let me know.
************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &

ASP.NET resources...
Nov 18 '05 #5
This is a better solution than the div solution I offered, if the content is
supposed to be editable, and if the content should be posted back to the
server.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message
news:e7**************@TK2MSFTNGP11.phx.gbl...
Paul,

You'll have to set the text box to multi-line to get your two lines of text.
One way to get rid of the scroll bar would be to use cascading style sheets:
.TextBox {
overflow: hidden
}

You could add this to your page's style sheet and then assign ".TextBox" to the CssStyle of the text box.

The choices you may assign to overflow are:

auto - If the content is clipped, the browser should display a scroll-bar to see the rest of the content

hidden - The content is clipped, but the browser does not display a
scroll-bar to see the rest of the content

scroll - The content is clipped, but the browser displays a scroll-bar to
see the rest of the content

visible - The content is not clipped. It renders outside the element.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Paul P" <pp*******@rattanconsulting.com> wrote in message
news:eS**************@TK2MSFTNGP12.phx.gbl...
I tried the multiline option but it has the scroll bar on it and I don't want to see the scroll bars. If you know of a way to get rid of the

scroll bars, please let me know.

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &

ASP.NET resources...

Nov 18 '05 #6

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

Similar topics

8
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for...
5
by: Steve S | last post by:
Heres what I want to do...User types into a texbox, clicks a button, the button saves that text to a file. The problem is that when I click the submit button, any changes made to the textbox are...
6
by: Lance Geeck | last post by:
I have a simple form where I am using a dataset called Client. On the data entry screen, there are name, address, city state and zip. I have the fields bound to the dataset field. (Properties...
0
by: d.steininger | last post by:
Hi there! Is there a way to bind a Textbox.Text to a ScrollBar.Value (not the Textbox-own Scrollbar) and vice versa? The Problem: I have to deal with two controls. The Textbox should accept...
16
by: mj.redfox.mj | last post by:
Can anyone help? I have a textbox which I'm programatically adding by using the following code: txtTest = New TextBox txtTest.ID = "txtLeft" + cntCount.ToString...
0
by: andytsummers | last post by:
Hi I have tried to implement drag and drop by using the following code but I have several problems. 1. When you put your mouse over selected text the cursor is still the i-beam and therefore...
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
4
by: pablorp80 | last post by:
Hello, Here is what I need: I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback. Here is the problem: I...
0
by: chandrasekhar | last post by:
Hi I have developed a web page with some controls. I put all of them in session variables. I passed this values in the page. When an user enter some data in form fields and click the buttton ,...
1
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...

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.