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

Code is automatically wrapped to next line

I am writing code for ASP.NET, and when switching between design and HTML
view in .aspx files many of the lines that are longer than the screen width
automatically wrap to the next line. I do not like to have tags broken in
the middle (I want everything between the < and > on the same line). Is
there any way to prevent Visual Studio from breaking the tags in the middle?
Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 19 '05 #1
4 2339
Hi Nathan,

The best way to avoid this problem is to remember that all code will
eventually be printed one day on a printer with 80 columns. It is best
to write your code to fit the printer, not your screen. Choose for
yourself where you want your code to switch lines, don't let the editor
do it. You'll be happier in the long run.

Paul

Nathan Sokalski wrote:
I am writing code for ASP.NET, and when switching between design and HTML
view in .aspx files many of the lines that are longer than the screen width
automatically wrap to the next line. I do not like to have tags broken in
the middle (I want everything between the < and > on the same line). Is
there any way to prevent Visual Studio from breaking the tags in the middle?
Thanks.

Nov 19 '05 #2
I am trying to choose for myself, but Visual Studio won't let me. Every time
I switch between Design and HTML views, it reorganizes the code in HTML
view. It also does this when I initially open a file. Just like everyone
else, I have my own ways of organizing code. I won't get into the details of
it here, but one of my most important rules is to never spread an individual
tag over multiple lines. I use this rule because tags that are spread over
multiple lines increases the amount of scrolling necessary. It also makes
the indentation often used for markup languages and other languages that use
tags less efficient because not all lines start with a tag and the amount of
vertical space between an opening and closing tag is increased. And in case
you haven't noticed, when code is printed from Visual Studio the lines
automatically wrap to fit the printer (as they will with most text editors,
some just don't display a "wrap-around" symbol like VS), so spending time
worrying about what my code will look like when printed is pointless,
especially since code is almost always edited on screen.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Paul Lennon" <ps******@comcast.net_NOSPAM> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi Nathan,

The best way to avoid this problem is to remember that all code will
eventually be printed one day on a printer with 80 columns. It is best to
write your code to fit the printer, not your screen. Choose for yourself
where you want your code to switch lines, don't let the editor do it.
You'll be happier in the long run.

Paul

Nathan Sokalski wrote:
I am writing code for ASP.NET, and when switching between design and HTML
view in .aspx files many of the lines that are longer than the screen
width automatically wrap to the next line. I do not like to have tags
broken in the middle (I want everything between the < and > on the same
line). Is there any way to prevent Visual Studio from breaking the tags
in the middle? Thanks.

Nov 19 '05 #3
Nathan,

That's a well known Design View problem.

1. Minimize using Design View.

2. If you still need it, press Ctrl Z (Undo) every time you switch back from
Design to HTML. In most cases this will restore previous html layout.

Eliyahu

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:uB**************@TK2MSFTNGP09.phx.gbl...
I am writing code for ASP.NET, and when switching between design and HTML
view in .aspx files many of the lines that are longer than the screen width automatically wrap to the next line. I do not like to have tags broken in
the middle (I want everything between the < and > on the same line). Is
there any way to prevent Visual Studio from breaking the tags in the middle? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Nov 19 '05 #4
This is a well known issue and cannot really be fixed in VS 2003.
You have to work around it.
Some people never switch.
Others use Dreamweaver and copy paste changes.
Fixed in VS 2005. No more re-writing HTML.
--
Joe Fallon


"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:uB**************@TK2MSFTNGP09.phx.gbl...
I am writing code for ASP.NET, and when switching between design and HTML
view in .aspx files many of the lines that are longer than the screen width
automatically wrap to the next line. I do not like to have tags broken in
the middle (I want everything between the < and > on the same line). Is
there any way to prevent Visual Studio from breaking the tags in the
middle? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Nov 19 '05 #5

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

Similar topics

14
by: Akbar | last post by:
Hey there, Big-time curiosity issue here... Here's the test code (it's not that long)... it's to display a large number of image links with captions, ideally pulled in from an external file...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
3
by: robboll | last post by:
Hi -- I have a Data entry/sequencing problem. Any help appreciated. Here is the scenario: Given -- A table with the following fields and sample data: LineNo Pri Comp Init Tgtno PMno...
11
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
13
by: vasudevmukherjee | last post by:
Hi! Can somebody help tell me why the following code gives a garbage value while producing first student's name, whereas it gives the names correctly for other three students - I really fail to...
1
by: Little | last post by:
Could someone help me figure out how to put my project together. I can't get my mind wrapped around the creation of the 4 double Linked Lists. Thank your for your insight. 1. Create 4 double...
27
by: Tom Cole | last post by:
I'm starting to do more quantity of javascript coding and thought this might be a good time to investigate code styling. I primarily develop in Java and currently use the code styling techniques...
13
by: problem. | last post by:
#include <stdio.h> #include <stdlib.h> int main(void) { int a, b; float result = 0.0f; char symbol = '\0'; int loop = 0;
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.