Solved

show validation erros in asp.net

Posted on 2007-11-22
6
1,641 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
creating a flowchart from an algorithm 5 21
cs.Designer Issue(2) 2 19
install app on other machine 13 11
C# TextBox 11 12
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now