ASP.NET v1.1, Validator Controls, Web Standards and Valid (X)HTML

D

danny.rendle

I am attempting to create a web site using ASP.NET v1.1 to comply with
the W3C's WAI Triple-A standard.

To this end I need ASP.NET to emit valid HTML 4.01 Transitional (once
confident with ASP.NET and HTML 4.01 I plan to move onto XHTML).

I have found several articles suggesting the use of Response Filters to
amend the HTML on route to the client which are very usefull for adding
a container for the ViewState and removing the Form's name attribute.

My problem is that when using Validator Controls to perform Client (and
Server Side) validation, for the Validators to work client side, they
must be accompanied by a hidden HTML span with multiple attributes.

E.g. <span id="ucClient_rfvFirstName"
controltovalidate="ucClient_txtFirstName" errormessage="First Name"
display="None"
evaluationfunction="RequiredFieldValidatorEvaluateIsValid"
initialvalue="" style="color:Red;display:none;"></span>

These additional attributes cause the markup to fail validation as they
are not part of the HTML 4.01 Transitional DTD.

Can anybody tell me how to make an ASP.NET page that uses Validator
Controls validate against the HTML 4.01 DTD?

Will I, as I currently fear, have to resort to Server Side validation
only?
 
S

Sergey Gorbachev

Could you look at this page from Opera or FireFox?

http://www.validatorcontrol.softain.com/Download.aspx

The page uses stardard validators for the email and password. The result
span is "<span id="Download__ctl0_EmailValidator"
style="visibility:hidden;">", without additional info. But the developers
changes standard validators for non-IE browsers only. You can try to repeat
their functionality or buy the source and change it to working with IE.
 
S

Sergey Gorbachev

Could you look at this page from Opera or FireFox?

http://www.validatorcontrol.softain.com/Demo.aspx

The page uses stardard validators. The result spans (for example,
<span id="Demo_LeftDemo_RequiredFieldValidator"
style="visibility:hidden;"><font color="Yellow">*</font></span>

) do not contain additional info. But the developers changes the validators
for non-IE browsers only. You can try to repeat their functionality or buy
the source and change it to working with IE.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top