Solved

show validation erros in asp.net

Posted on 2007-11-22
6
1,648 Views
Last Modified: 2013-11-07
I have a website in ASP.NET with C#
when I compile the project I have no errors.
When I do have an error I see besides the  new error many error in the HTML code. (validation erros)
Why I don't see these errors all the time.
I gauess this is a parameter in the debugging mode but I don't know where.
for example:

Validation (XHTML 1.0 Transitional): Element 'td' is missing its closing tag.      
Validation (XHTML 1.0 Transitional): Element 'img' is missing required attribute 'alt'.      
Thankyou
Anat
0
Comment
Question by:ANAT2403
  • 2
  • 2
  • 2
6 Comments
 
LVL 5

Expert Comment

by:gocemi
ID: 20334108
See this

http://www.w3schools.com/tags/tag_doctype.asp
http://htmlhelp.com/tools/validator/doctype.html

It's about the
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > - line in the .aspx file
0
 

Author Comment

by:ANAT2403
ID: 20334134
The question is how to cause the compiler to show these error messages in each compilation and not only when there are other errors.
Anat
0
 
LVL 10

Accepted Solution

by:
joex911 earned 500 total points
ID: 20334236
Hi, HTML validation errors are shown as warnings, to see them you have to open the Error List Window after you compile your program, it may also be the case that you have to enable the warnings to be visible in this window as well.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:ANAT2403
ID: 20334268
Hi,
this is not the case.
These validation erros were not seen at all also in the warning list window untill there was a   non validation errors and only then I could see all the errors
Anat
0
 
LVL 5

Expert Comment

by:gocemi
ID: 20334382
Hi,
VS validates you'r HTML based on the
DOCUMENTTYPE declared in the aspx file
try changing the
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

To

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 

0
 
LVL 10

Expert Comment

by:joex911
ID: 20334397
Is it enable in visual studio options?
Check the Show Errors option in Tools->Options->Text Editor->Html->Validation
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question