Link to home
Start Free TrialLog in
Avatar of ANAT2403
ANAT2403Flag for Israel

asked on

show validation erros in asp.net

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
Avatar of gocemi
gocemi
Flag of North Macedonia image

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
Avatar of ANAT2403

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Oliver Amaya
Oliver Amaya
Flag of Venezuela, Bolivarian Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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"> 

Is it enable in visual studio options?
Check the Show Errors option in Tools->Options->Text Editor->Html->Validation