<span> attributes

A

Ante Perkovic

Hi,

I noticed that client-side validation (in IE6) is done with <span>
tags that have the same attributes as in original aspx code
(controlToValidate and others...). I noticed that, when i save
generated html as a new document with html extension and open it in
Visual Studio.NET, the same VS.NET that created them doesn't
recognised those span atributtes (ie.5 shema is used) and marks them
with underline!
How is it possible that VS.NET doesn't recognize its own creation?

Also, i couldn't find any javascript that actually makes validator's
text visible on submit.
Is it done by some javascript code that is inserted in page with some
included .js file or is this functionality included in <span> tag?

Thanks, Ante
 
D

David Waz...

..Net uses HTML and .Net syntax standards. These extended attributes are not
really part of either world.

..Net uses the fact that you can define your own attributes. The development
environment may underline the "offending" attribute, but you can still use
them.

Check out <Center>...</center> same thing - it doesn't "like" it, but you
can use it. Think of it as a little warning, not as an error.
 
C

Chris R. Timmons

(e-mail address removed) (Ante Perkovic) wrote in
Hi,

I noticed that client-side validation (in IE6) is done with
<span> tags that have the same attributes as in original aspx
code (controlToValidate and others...). I noticed that, when i
save generated html as a new document with html extension and
open it in Visual Studio.NET, the same VS.NET that created them
doesn't recognised those span atributtes (ie.5 shema is used)
and marks them with underline!
How is it possible that VS.NET doesn't recognize its own
creation?

Ante,

controlToValidate is not a standard attribute of the <SPAN> tag. A
browser will ignore any invalid HTML it sees. VS.NET doesn't know
that the controlToValidate attribute was added to the <SPAN> tag by
an ASP.NET validator, so it sees controlToValidate as invalid and
underlines it.
Also, i couldn't find any javascript that actually makes
validator's text visible on submit.
Is it done by some javascript code that is inserted in page with
some included .js file or is this functionality included in
<span> tag?

ASP.NET pages include a JavaScript file located on the server at:

C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322

The script's name is WebUIValidation.js. Code in the script
shows/hides the error text from a validator by setting the <SPAN>
tag's style.display property:

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/
display.asp


Hope this helps.

Chris.
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top