473,772 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visual Studio keeps removing my closing </li> tags

I have a section in my ASP.NET code where I have an HTML unordered list.
Visual Studio keeps removing the closing list item tags, except for the last
list item. In other words, Visual Studio makes my code look like the
following:

<ul>
<li>adasf
<li>asdfsa
<li>asdfd
<li>adfsdf</li>
</ul>

First of all, it really annoys me that it removes the closing tags at all,
but why does it remove all but the last one? Any ideas would be appreciated.
Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Nov 19 '05 #1
2 1941
Some tags don't require ending tags. I prefer them, but that doesn't stop
VS from removing them. As to why it doesn't remove the last one, it's just
one of those 100's of quirks. At least it's better than front page.
"Nathan Sokalski" <nj********@hot mail.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I have a section in my ASP.NET code where I have an HTML unordered list.
Visual Studio keeps removing the closing list item tags, except for the
last list item. In other words, Visual Studio makes my code look like the
following:

<ul>
<li>adasf
<li>asdfsa
<li>asdfd
<li>adfsdf</li>
</ul>

First of all, it really annoys me that it removes the closing tags at all,
but why does it remove all but the last one? Any ideas would be
appreciated. Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

Nov 19 '05 #2
Check the schema that the document is set to be compliant with. This
determines how VS .NET will write the HTML for you.
"Jeremy Chapman" <me@here.com> wrote in message
news:ua******** ******@TK2MSFTN GP15.phx.gbl...
Some tags don't require ending tags. I prefer them, but that doesn't stop
VS from removing them. As to why it doesn't remove the last one, it's
just one of those 100's of quirks. At least it's better than front page.
"Nathan Sokalski" <nj********@hot mail.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I have a section in my ASP.NET code where I have an HTML unordered list.
Visual Studio keeps removing the closing list item tags, except for the
last list item. In other words, Visual Studio makes my code look like the
following:

<ul>
<li>adasf
<li>asdfsa
<li>asdfd
<li>adfsdf</li>
</ul>

First of all, it really annoys me that it removes the closing tags at
all, but why does it remove all but the last one? Any ideas would be
appreciated. Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/


Nov 19 '05 #3

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

Similar topics

3
3949
by: Jean-Fran?ois Lacrampe | last post by:
Hello, I want to write a _very_ simple text parser that would replace a string like: "This is text with /italics/, *bold* and _underline_." and generate automatically something like this: "This is text with <i>italics</i>, <b>bold</b> and <span
3
1613
by: Ian Partridge | last post by:
Hello, I am planning to use XML in a log file for an application I am writing. The format will be something like: <task date="2003-10-09" time="12:03:45"> <action type="action1" timetaken="4" /> <action type="action2" timetaken="4" /> <action type="action3" timetaken="4" /> </task duration="12">
3
1474
by: Barry | last post by:
Hi HTML Experts, I would appreciate some advice about my problem where numbers are not being displayed correctly from a series of <LI> tags on this page :- http://www.databaseanswers.com/satisfied_users.htm The first 9 are OK, then the first digit looks funny, and then is not displayed at all when the number gets to 100. I would welcome any and all suggestions.
2
2200
by: Heinz Willi Wiedow | last post by:
Hey XML-Fans, I transform some XML-Files with XmlT to html. I want to have a DOCTYPE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
10621
by: Mark | last post by:
Hi there I am using <li> tags for my menu. <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul>
3
3382
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt, &gt ,&ltCompany&gt to display '<', '>' and '<Company>' respectively. But is there any freeware code available which could implement the above functionality without having to use &gt,&lt and such stuff???
4
11169
by: David Cartwright | last post by:
Hi, I have a VB.NET (VS2005, .NET 2.0) application producing an XML file which is then used by a third-party product. It turns out the latter doesn't like self-closing tags (i.e. it would rather see <CardNo></CardNothan <CardNo />). Is there a simple way to tell the XMLDocument to use the "traditional" way of showing an empty tag instead of always saving self-closing tags?
1
4242
by: cherliloo | last post by:
How can i format ul / li tags in css? I'm not sure if it's possible to even format this. But here goes. "_" represent empty space . when i make a list on the web, it looks like this -main text (ul) - sub text (li) - sub text (li) But i would like the sub text to flush closer to the main text above it. Like so:
1
5144
by: Nathan Sokalski | last post by:
I am using the System.Web.UI.HtmlTextWriter, and would like to create tags that are self-closing (such as <tagname />). The RenderBeginTag method does not offer the option of making a self-closing tag (I think it should have an optional boolean parameter to specify whether it is self-closing, but it doesn't). I know how to make self-closing tags using the Write methods, but this requires calling a write method for every attribute and style,...
0
9620
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...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9912
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
8934
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
7460
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
5354
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...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3
2850
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.