Solved

show validation erros in asp.net

Posted on 2007-11-22
6
1,650 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:
Oliver Amaya 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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

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:Oliver Amaya
ID: 20334397
Is it enable in visual studio options?
Check the Show Errors option in Tools->Options->Text Editor->Html->Validation
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with opening combobox using VB.NET. 3 25
Convert Ctime to date time in textfile? 7 31
Need help Creating PowerShell Script 5 53
ASP.NET Content Page 3 28
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

861 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